diff --git a/code/3DSExporter.cpp b/code/3DSExporter.cpp index f33799fef..16e1e8a01 100644 --- a/code/3DSExporter.cpp +++ b/code/3DSExporter.cpp @@ -164,7 +164,7 @@ void ExportScene3DS(const char* pFile, IOSystem* pIOSystem, const aiScene* pScen // in |Exporter::ExportFormatEntry|. aiScene* scenecopy_tmp; SceneCombiner::CopyScene(&scenecopy_tmp,pScene); - std::auto_ptr scenecopy(scenecopy_tmp); + std::unique_ptr scenecopy(scenecopy_tmp); SplitLargeMeshesProcess_Triangle tri_splitter; tri_splitter.SetLimit(0xffff); diff --git a/code/Exporter.cpp b/code/Exporter.cpp index 873fa1612..72aae1acc 100644 --- a/code/Exporter.cpp +++ b/code/Exporter.cpp @@ -324,7 +324,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const aiScene* scenecopy_tmp; SceneCombiner::CopyScene(&scenecopy_tmp,pScene); - std::auto_ptr scenecopy(scenecopy_tmp); + std::unique_ptr scenecopy(scenecopy_tmp); const ScenePrivateData* const priv = ScenePriv(pScene); // steps that are not idempotent, i.e. we might need to run them again, usually to get back to the diff --git a/code/IFCLoader.cpp b/code/IFCLoader.cpp index 4366fa04e..de4384082 100644 --- a/code/IFCLoader.cpp +++ b/code/IFCLoader.cpp @@ -423,7 +423,7 @@ void ResolveObjectPlacement(aiMatrix4x4& m, const IfcObjectPlacement& place, Con bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector< aiNode* >& subnodes_src, unsigned int matid, ConversionData& conv) { // insert a custom node here, the cartesian transform operator is simply a conventional transformation matrix - std::auto_ptr nd(new aiNode()); + std::unique_ptr nd(new aiNode()); nd->mName.Set("IfcMappedItem"); // handle the Cartesian operator @@ -684,7 +684,7 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion } // add an output node for this spatial structure - std::auto_ptr nd(new aiNode()); + std::unique_ptr nd(new aiNode()); nd->mName.Set(el.GetClassName()+"_"+(el.Name?el.Name.Get():"Unnamed")+"_"+el.GlobalId); nd->mParent = parent; @@ -771,7 +771,7 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion const IfcFeatureElementSubtraction& open = fills->RelatedOpeningElement; // move opening elements to a separate node since they are semantically different than elements that are just 'contained' - std::auto_ptr nd_aggr(new aiNode()); + std::unique_ptr nd_aggr(new aiNode()); nd_aggr->mName.Set("$RelVoidsElement"); nd_aggr->mParent = nd.get(); @@ -816,7 +816,7 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion } // move aggregate elements to a separate node since they are semantically different than elements that are just 'contained' - std::auto_ptr nd_aggr(new aiNode()); + std::unique_ptr nd_aggr(new aiNode()); nd_aggr->mName.Set("$RelAggregates"); nd_aggr->mParent = nd.get(); diff --git a/code/IFCMaterial.cpp b/code/IFCMaterial.cpp index be0015bab..25686b83f 100644 --- a/code/IFCMaterial.cpp +++ b/code/IFCMaterial.cpp @@ -154,7 +154,7 @@ unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionDat IFCImporter::LogWarn("ignoring surface side marker on IFC::IfcSurfaceStyle: " + side); } - std::auto_ptr mat(new aiMaterial()); + std::unique_ptr mat(new aiMaterial()); FillMaterial(mat.get(), surf, conv); @@ -190,7 +190,7 @@ unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionDat } // we're here, yet - no default material with suitable color available. Generate one - std::auto_ptr mat(new aiMaterial()); + std::unique_ptr mat(new aiMaterial()); mat->AddProperty(&name,AI_MATKEY_NAME); const aiColor4D col = aiColor4D( 0.6f, 0.6f, 0.6f, 1.0f); // aiColor4D( color.r, color.g, color.b, 1.0f); diff --git a/code/IFCUtil.cpp b/code/IFCUtil.cpp index 7a47fb02d..89a6c78c5 100644 --- a/code/IFCUtil.cpp +++ b/code/IFCUtil.cpp @@ -75,7 +75,7 @@ aiMesh* TempMesh::ToMesh() return NULL; } - std::auto_ptr mesh(new aiMesh()); + std::unique_ptr mesh(new aiMesh()); // copy vertices mesh->mNumVertices = static_cast(verts.size()); diff --git a/code/STEPFile.h b/code/STEPFile.h index 050e76b24..63a1c2239 100644 --- a/code/STEPFile.h +++ b/code/STEPFile.h @@ -509,7 +509,7 @@ namespace STEP { static Object* Construct(const STEP::DB& db, const EXPRESS::LIST& params) { // make sure we don't leak if Fill() throws an exception - std::auto_ptr impl(new TDerived()); + std::unique_ptr impl(new TDerived()); // GenericFill is undefined so we need to have a specialization const size_t num_args = GenericFill(db,params,&*impl); diff --git a/code/STEPFileReader.cpp b/code/STEPFileReader.cpp index 424653193..70217b1c6 100644 --- a/code/STEPFileReader.cpp +++ b/code/STEPFileReader.cpp @@ -88,7 +88,7 @@ STEP::TypeError::TypeError (const std::string& s,uint64_t entity /* = ENTITY_NOT STEP::DB* STEP::ReadFileHeader(boost::shared_ptr stream) { boost::shared_ptr reader = boost::shared_ptr(new StreamReaderLE(stream)); - std::auto_ptr db = std::auto_ptr(new STEP::DB(reader)); + std::unique_ptr db = std::unique_ptr(new STEP::DB(reader)); LineSplitter& splitter = db->GetSplitter(); if (!splitter || *splitter != "ISO-10303-21;") {