diff --git a/stepmania/src/NotesWriterSM.h b/stepmania/src/NotesWriterSM.h index bfb11d5303..d29599c430 100644 --- a/stepmania/src/NotesWriterSM.h +++ b/stepmania/src/NotesWriterSM.h @@ -6,11 +6,10 @@ class Song; class Steps; class RageFile; -class NotesWriterSM +namespace NotesWriterSM { -public: bool Write( RString sPath, const Song &out, bool bSavingCache ); - static void GetEditFileContents( const Song *pSong, const Steps *pSteps, RString &sOut ); + void GetEditFileContents( const Song *pSong, const Steps *pSteps, RString &sOut ); RString GetEditFileName( const Song *pSong, const Steps *pSteps ); bool WriteEditFileToMachine( const Song *pSong, Steps *pSteps, RString &sErrorOut ); }; diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 5f516e6fa5..4f6ada6102 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -2823,11 +2823,10 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns { ASSERT( m_pSteps->IsAnEdit() ); - NotesWriterSM w; RString sError; m_pSteps->CalculateRadarValues( m_pSong->m_fMusicLengthSeconds ); - if( !w.WriteEditFileToMachine(m_pSong, m_pSteps, sError) ) + if( !NotesWriterSM::WriteEditFileToMachine(m_pSong, m_pSteps, sError) ) { ScreenPrompt::Prompt( SM_None, sError ); break; diff --git a/stepmania/src/ScreenOptionsManageEditSteps.cpp b/stepmania/src/ScreenOptionsManageEditSteps.cpp index 35f54a2014..3a04925c92 100644 --- a/stepmania/src/ScreenOptionsManageEditSteps.cpp +++ b/stepmania/src/ScreenOptionsManageEditSteps.cpp @@ -156,8 +156,7 @@ void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM ) pSteps->SetDescription( ScreenTextEntry::s_sLastAnswer ); RString sError; - NotesWriterSM sm; - if( !sm.WriteEditFileToMachine(pSong,pSteps,sError) ) + if( !NotesWriterSM::WriteEditFileToMachine(pSong,pSteps,sError) ) { ScreenPrompt::Prompt( SM_None, sError ); return; diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 66c3aae9f3..18ac192b9f 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -754,8 +754,7 @@ void Song::SaveToSMFile( RString sPath, bool bSavingCache ) if( !bSavingCache && IsAFile(sPath) ) FileCopy( sPath, sPath + ".old" ); - NotesWriterSM wr; - wr.Write( sPath, *this, bSavingCache ); + NotesWriterSM::Write( sPath, *this, bSavingCache ); } void Song::SaveToCacheFile()