Merge pull request #379 from f3nix/deprecated_auto_ptr

Do not use std::auto_ptr which has been deprecated as of C++11.
This commit is contained in:
wwmayer 2016-12-14 09:38:51 +01:00 committed by GitHub
commit b885c30021
8 changed files with 16 additions and 16 deletions

View File

@ -265,7 +265,7 @@ public:
typedef TNodeOfNodeListMap::iterator TNodeOfNodeListMapItr;
typedef std::vector<TNodeOfNodeListMapItr> TVecOfNnlmiMap;
typedef std::map<const SMDS_MeshElement*, TVecOfNnlmiMap, TElemSort > TElemOfVecOfNnlmiMap;
typedef std::auto_ptr< std::list<int> > PGroupIDs;
typedef std::unique_ptr< std::list<int> > PGroupIDs;
PGroupIDs RotationSweep (TIDSortedElemSet theElements[2],
const gp_Ax1& theAxis,

View File

@ -2917,7 +2917,7 @@ void ConnectedElements::SetPoint( double x, double y, double z )
// find myNodeID by myXYZ if possible
if ( myMeshModifTracer.GetMesh() )
{
auto_ptr<SMESH_ElementSearcher> searcher
unique_ptr<SMESH_ElementSearcher> searcher
( SMESH_MeshAlgos::GetElementSearcher( (SMDS_Mesh&) *myMeshModifTracer.GetMesh() ));
vector< const SMDS_MeshElement* > foundElems;

View File

@ -11049,8 +11049,8 @@ bool SMESH_MeshEditor::AffectedElemGroupsInRegion( const TIDSortedElemSet& theEl
else
{
const double aTol = Precision::Confusion();
auto_ptr< BRepClass3d_SolidClassifier> bsc3d;
auto_ptr<_FaceClassifier> aFaceClassifier;
unique_ptr< BRepClass3d_SolidClassifier> bsc3d;
unique_ptr<_FaceClassifier> aFaceClassifier;
if ( theShape.ShapeType() == TopAbs_SOLID )
{
bsc3d.reset( new BRepClass3d_SolidClassifier(theShape));;
@ -11114,8 +11114,8 @@ bool SMESH_MeshEditor::DoubleNodesInRegion( const TIDSortedElemSet& theElems,
return false;
const double aTol = Precision::Confusion();
auto_ptr< BRepClass3d_SolidClassifier> bsc3d;
auto_ptr<_FaceClassifier> aFaceClassifier;
unique_ptr< BRepClass3d_SolidClassifier> bsc3d;
unique_ptr<_FaceClassifier> aFaceClassifier;
if ( theShape.ShapeType() == TopAbs_SOLID )
{
bsc3d.reset( new BRepClass3d_SolidClassifier(theShape));;

View File

@ -4584,7 +4584,7 @@ namespace { // Structures used by FixQuadraticElements()
SMDS_ElemIteratorPtr faceIter( new TIterOnIter( faceIterVec ));
// a seacher to check if a volume is close to a concave face
std::auto_ptr< SMESH_ElementSearcher > faceSearcher
std::unique_ptr< SMESH_ElementSearcher > faceSearcher
( SMESH_MeshAlgos::GetElementSearcher( *theHelper.GetMeshDS(), faceIter ));
// classifier

View File

@ -173,7 +173,7 @@ namespace {
// check if an edge is a part of a complex side
TopoDS_Face face;
TopoDS_Edge edge = TopoDS::Edge( subMesh->GetSubShape() );
auto_ptr< StdMeshers_FaceSide > side
unique_ptr< StdMeshers_FaceSide > side
( StdMeshers_CompositeSegment_1D::GetFaceSide(*subMesh->GetFather(),
edge, face, false ));
if ( side->NbEdges() > 1 && side->NbSegments() )
@ -287,7 +287,7 @@ void StdMeshers_CompositeSegment_1D::SetEventListener(SMESH_subMesh* subMesh)
// check if an edge is a part of a complex side
TopoDS_Face face;
TopoDS_Edge edge = TopoDS::Edge( subMesh->GetSubShape() );
auto_ptr< StdMeshers_FaceSide > side
unique_ptr< StdMeshers_FaceSide > side
( StdMeshers_CompositeSegment_1D::GetFaceSide(*subMesh->GetFather(),edge, face, false ));
if ( side->NbEdges() > 1 ) { // complex
@ -368,7 +368,7 @@ bool StdMeshers_CompositeSegment_1D::Compute(SMESH_Mesh & aMesh,
// Get edges to be discretized as a whole
TopoDS_Face nullFace;
auto_ptr< StdMeshers_FaceSide > side( GetFaceSide(aMesh, edge, nullFace, true ));
unique_ptr< StdMeshers_FaceSide > side( GetFaceSide(aMesh, edge, nullFace, true ));
//side->dump("IN COMPOSITE SEG");
if ( side->NbEdges() < 2 )
@ -384,7 +384,7 @@ bool StdMeshers_CompositeSegment_1D::Compute(SMESH_Mesh & aMesh,
}
// Compute node parameters
auto_ptr< BRepAdaptor_CompCurve > C3d ( side->GetCurve3d() );
unique_ptr< BRepAdaptor_CompCurve > C3d ( side->GetCurve3d() );
double f = C3d->FirstParameter(), l = C3d->LastParameter();
list< double > params;
if ( !computeInternalParameters ( aMesh, *C3d, side->Length(), f, l, params, false ))

View File

@ -161,7 +161,7 @@ bool StdMeshers_RadialPrism_3D::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& a
myHelper = new SMESH_MesherHelper( aMesh );
myHelper->IsQuadraticSubMesh( aShape );
// to delete helper at exit from Compute()
std::auto_ptr<SMESH_MesherHelper> helperDeleter( myHelper );
std::unique_ptr<SMESH_MesherHelper> helperDeleter( myHelper );
// get 2 shells
TopoDS_Solid solid = TopoDS::Solid( aShape );

View File

@ -1137,7 +1137,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
myHelper = new SMESH_MesherHelper( aMesh );
myHelper->SetSubShape( aShape );
auto_ptr<SMESH_MesherHelper> helperDeleter( myHelper );
unique_ptr<SMESH_MesherHelper> helperDeleter( myHelper );
TNodeDistributor* algo1d = TNodeDistributor::GetDistributor(aMesh);

View File

@ -3606,7 +3606,7 @@ void _ViscousBuilder::computeGeomSize( _SolidData& data )
{
data._geomSize = Precision::Infinite();
double intersecDist;
auto_ptr<SMESH_ElementSearcher> searcher
unique_ptr<SMESH_ElementSearcher> searcher
( SMESH_MeshAlgos::GetElementSearcher( *getMeshDS(),
data._proxyMesh->GetFaces( data._solid )) );
@ -3948,7 +3948,7 @@ bool _ViscousBuilder::smoothAndCheck(_SolidData& data,
// Check if the last segments of _LayerEdge intersects 2D elements;
// checked elements are either temporary faces or faces on surfaces w/o the layers
auto_ptr<SMESH_ElementSearcher> searcher
unique_ptr<SMESH_ElementSearcher> searcher
( SMESH_MeshAlgos::GetElementSearcher( *getMeshDS(),
data._proxyMesh->GetFaces( data._solid )) );
@ -4464,7 +4464,7 @@ bool _ViscousBuilder::updateNormals( _SolidData& data,
SMDS_ElemIteratorPtr fIt( new SMDS_ElementVectorIterator( tmpFaces.begin(),
tmpFaces.end()));
auto_ptr<SMESH_ElementSearcher> searcher
unique_ptr<SMESH_ElementSearcher> searcher
( SMESH_MeshAlgos::GetElementSearcher( *getMeshDS(), fIt ));
// 1) Find intersections