replace deprecated auto_ptr with unique_ptr

This commit is contained in:
wmayer
2016-09-22 13:01:20 +02:00
parent 1ce73dda96
commit f944ab3846
47 changed files with 129 additions and 129 deletions

View File

@@ -297,7 +297,7 @@ Document* Application::newDocument(const char * Name, const char * UserName)
}
// create the FreeCAD document
auto_ptr<Document> newDoc(new Document() );
std::unique_ptr<Document> newDoc(new Document() );
// add the document to the internal list
DocMap[name] = newDoc.release(); // now owned by the Application
@@ -341,7 +341,7 @@ bool Application::closeDocument(const char* name)
// For exception-safety use a smart pointer
if (_pActiveDoc == pos->second)
setActiveDocument((Document*)0);
auto_ptr<Document> delDoc (pos->second);
std::unique_ptr<Document> delDoc (pos->second);
DocMap.erase( pos );
// Trigger observers after removing the document from the internal map.