No persistent data so make it a namespace.
This commit is contained in:
@@ -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 );
|
||||
};
|
||||
|
||||
@@ -2823,11 +2823,10 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user