[Orxonox-commit 6115] r10773 - in code/branches/cpp11_v2/src: external/tinyxml libraries/core

landauf at orxonox.net landauf at orxonox.net
Sat Nov 7 18:03:27 CET 2015


Author: landauf
Date: 2015-11-07 18:03:26 +0100 (Sat, 07 Nov 2015)
New Revision: 10773

Modified:
   code/branches/cpp11_v2/src/external/tinyxml/ticpp.cpp
   code/branches/cpp11_v2/src/external/tinyxml/ticpp.h
   code/branches/cpp11_v2/src/libraries/core/GUIManager.cc
Log:
using std::unique_ptr instead of std::auto_ptr

Modified: code/branches/cpp11_v2/src/external/tinyxml/ticpp.cpp
===================================================================
--- code/branches/cpp11_v2/src/external/tinyxml/ticpp.cpp	2015-11-07 16:38:21 UTC (rev 10772)
+++ code/branches/cpp11_v2/src/external/tinyxml/ticpp.cpp	2015-11-07 17:03:26 UTC (rev 10773)
@@ -716,14 +716,14 @@
 	return temp;
 }
 
-std::auto_ptr< Node > Node::Clone() const
+std::unique_ptr< Node > Node::Clone() const
 {
 	TiXmlNode* node = GetTiXmlPointer()->Clone();
 	if ( 0 == node )
 	{
 		TICPPTHROW( "Node could not be cloned" );
 	}
-	std::auto_ptr< Node > temp( NodeFactory( node, false, false ) );
+	std::unique_ptr< Node > temp( NodeFactory( node, false, false ) );
 
 	// Take ownership of the memory from TiXml
 	temp->m_impRC->InitRef();

Modified: code/branches/cpp11_v2/src/external/tinyxml/ticpp.h
===================================================================
--- code/branches/cpp11_v2/src/external/tinyxml/ticpp.h	2015-11-07 16:38:21 UTC (rev 10772)
+++ code/branches/cpp11_v2/src/external/tinyxml/ticpp.h	2015-11-07 17:03:26 UTC (rev 10773)
@@ -965,13 +965,13 @@
 		/**
 		Create an exact duplicate of this node and return it.
 
-		@note Using auto_ptr to manage the memory declared on the heap by TiXmlNode::Clone.
+		@note Using unique_ptr to manage the memory declared on the heap by TiXmlNode::Clone.
 		@code
 		// Now using clone
 		ticpp::Document doc( "C:\\Test.xml" );
 		ticpp::Node* sectionToClone;
 		sectionToClone = doc.FirstChild( "settings" );
-		std::auto_ptr< ticpp::Node > clonedNode = sectionToClone->Clone();
+		std::unique_ptr< ticpp::Node > clonedNode = sectionToClone->Clone();
 		// Now you can use the clone.
 		ticpp::Node* node2 = clonedNode->FirstChildElement()->FirstChild();
 		...
@@ -979,7 +979,7 @@
 		@endcode
 		@return Pointer the duplicate node.
 		*/
-		std::auto_ptr< Node > Clone() const;
+		std::unique_ptr< Node > Clone() const;
 
 		/**
 		Accept a hierchical visit the nodes in the TinyXML DOM.

Modified: code/branches/cpp11_v2/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/GUIManager.cc	2015-11-07 16:38:21 UTC (rev 10772)
+++ code/branches/cpp11_v2/src/libraries/core/GUIManager.cc	2015-11-07 17:03:26 UTC (rev 10773)
@@ -329,7 +329,7 @@
         scriptModule_->setDefaultPCallErrorHandler(LuaState::ERROR_HANDLER_NAME);
 
         // Create our own logger to specify the filepath
-        std::auto_ptr<CEGUILogger> ceguiLogger(new CEGUILogger());
+        std::unique_ptr<CEGUILogger> ceguiLogger(new CEGUILogger());
         ceguiLogger->setLogFilename(ConfigurablePaths::getLogPathString() + "cegui.log");
         ceguiLogger->setLoggingLevel(static_cast<CEGUI::LoggingLevel>(this->outputLevelCeguiLog_));
         this->ceguiLogger_ = ceguiLogger.release();




More information about the Orxonox-commit mailing list