Use unique_ptr instead of auto_ptr
This commit is contained in:
parent
75c1f02615
commit
e1f61040e5
@ -53,7 +53,7 @@ ChallengeData::ChallengeData(const std::string& filename)
|
||||
|
||||
// we are using auto_ptr to make sure the XML node is released when leaving
|
||||
// the scope
|
||||
std::auto_ptr<XMLNode> root(new XMLNode( filename ));
|
||||
std::unique_ptr<XMLNode> root(new XMLNode( filename ));
|
||||
|
||||
if(root.get() == NULL || root->getName()!="challenge")
|
||||
{
|
||||
|
@ -342,7 +342,7 @@ video::ITexture* IconButtonWidget::getDeactivatedTexture(video::ITexture* textur
|
||||
u32 g;
|
||||
|
||||
video::IVideoDriver* driver = irr_driver->getVideoDriver();
|
||||
std::auto_ptr<video::IImage> image (driver->createImageFromData (texture->getColorFormat(),
|
||||
std::unique_ptr<video::IImage> image (driver->createImageFromData (texture->getColorFormat(),
|
||||
texture->getSize(), texture->lock(), false));
|
||||
texture->unlock();
|
||||
|
||||
|
@ -251,7 +251,7 @@ void GrandPrixData::reload()
|
||||
m_laps.clear();
|
||||
m_reversed.clear();
|
||||
|
||||
std::auto_ptr<XMLNode> root(file_manager->createXMLTree(m_filename));
|
||||
std::unique_ptr<XMLNode> root(file_manager->createXMLTree(m_filename));
|
||||
if (root.get() == NULL)
|
||||
{
|
||||
Log::error("GrandPrixData",
|
||||
|
Loading…
x
Reference in New Issue
Block a user