revert unique_ptr back to auto_ptr
This commit is contained in:
parent
a3a851b300
commit
d4e90f83f2
@ -17,7 +17,6 @@
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#include "challenges/challenge_data.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
||||
@ -52,9 +51,9 @@ ChallengeData::ChallengeData(const std::string& filename)
|
||||
m_ai_superpower[d] = RaceManager::SUPERPOWER_NONE;
|
||||
}
|
||||
|
||||
// we are using unique_ptr to make sure the XML node is released when leaving
|
||||
// we are using auto_ptr to make sure the XML node is released when leaving
|
||||
// the scope
|
||||
std::unique_ptr<XMLNode> root(new XMLNode( filename ));
|
||||
std::auto_ptr<XMLNode> root(new XMLNode( filename ));
|
||||
|
||||
if(root.get() == NULL || root->getName()!="challenge")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user