Change our auto_ptr's to unique_ptr's.

auto_ptr is deprecated in c++11.
This commit is contained in:
Jason Felds
2013-05-04 14:11:47 -04:00
parent a8fe2634ca
commit 25c3c7d4f1
9 changed files with 472 additions and 472 deletions
+4 -4
View File
@@ -801,7 +801,7 @@ ProfileLoadResult Profile::LoadAllFromDir( RString sDir, bool bRequireSignature
}
int iError;
auto_ptr<RageFileBasic> pFile( FILEMAN->Open(fn, RageFile::READ, iError) );
unique_ptr<RageFileBasic> pFile( FILEMAN->Open(fn, RageFile::READ, iError) );
if( pFile.get() == nullptr )
{
LOG->Trace( "Error opening %s: %s", fn.c_str(), strerror(iError) );
@@ -943,7 +943,7 @@ XNode *Profile::SaveStatsXmlCreateNode() const
bool Profile::SaveStatsXmlToDir( RString sDir, bool bSignData ) const
{
LOG->Trace( "SaveStatsXmlToDir: %s", sDir.c_str() );
auto_ptr<XNode> xml( SaveStatsXmlCreateNode() );
unique_ptr<XNode> xml( SaveStatsXmlCreateNode() );
// Save stats.xml
RString fn = sDir + (g_bProfileDataCompress? STATS_XML_GZ:STATS_XML);
@@ -1765,7 +1765,7 @@ void Profile::SaveStepsRecentScore( const Song* pSong, const Steps* pSteps, High
ASSERT( h.stepsID.IsValid() );
h.hs = hs;
auto_ptr<XNode> xml( new XNode("Stats") );
unique_ptr<XNode> xml( new XNode("Stats") );
xml->AppendChild( "MachineGuid", PROFILEMAN->GetMachineProfile()->m_sGuid );
XNode *recent = xml->AppendChild( new XNode("RecentSongScores") );
recent->AppendChild( h.CreateNode() );
@@ -1792,7 +1792,7 @@ void Profile::SaveCourseRecentScore( const Course* pCourse, const Trail* pTrail,
h.trailID.FromTrail( pTrail );
h.hs = hs;
auto_ptr<XNode> xml( new XNode("Stats") );
unique_ptr<XNode> xml( new XNode("Stats") );
xml->AppendChild( "MachineGuid", PROFILEMAN->GetMachineProfile()->m_sGuid );
XNode *recent = xml->AppendChild( new XNode("RecentCourseScores") );
recent->AppendChild( h.CreateNode() );