No persistent data so make it a namespace.

This commit is contained in:
Steve Checkoway
2006-11-04 23:28:33 +00:00
parent 4ab88447f4
commit 0ed39a2f5e
4 changed files with 5 additions and 9 deletions
+2 -3
View File
@@ -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 );
};
+1 -2
View File
@@ -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;
+1 -2
View File
@@ -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()