No persistent data so make it a namespace.
This commit is contained in:
@@ -6,11 +6,10 @@
|
|||||||
class Song;
|
class Song;
|
||||||
class Steps;
|
class Steps;
|
||||||
class RageFile;
|
class RageFile;
|
||||||
class NotesWriterSM
|
namespace NotesWriterSM
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
bool Write( RString sPath, const Song &out, bool bSavingCache );
|
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 );
|
RString GetEditFileName( const Song *pSong, const Steps *pSteps );
|
||||||
bool WriteEditFileToMachine( const Song *pSong, Steps *pSteps, RString &sErrorOut );
|
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() );
|
ASSERT( m_pSteps->IsAnEdit() );
|
||||||
|
|
||||||
NotesWriterSM w;
|
|
||||||
RString sError;
|
RString sError;
|
||||||
|
|
||||||
m_pSteps->CalculateRadarValues( m_pSong->m_fMusicLengthSeconds );
|
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 );
|
ScreenPrompt::Prompt( SM_None, sError );
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -156,8 +156,7 @@ void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
pSteps->SetDescription( ScreenTextEntry::s_sLastAnswer );
|
pSteps->SetDescription( ScreenTextEntry::s_sLastAnswer );
|
||||||
|
|
||||||
RString sError;
|
RString sError;
|
||||||
NotesWriterSM sm;
|
if( !NotesWriterSM::WriteEditFileToMachine(pSong,pSteps,sError) )
|
||||||
if( !sm.WriteEditFileToMachine(pSong,pSteps,sError) )
|
|
||||||
{
|
{
|
||||||
ScreenPrompt::Prompt( SM_None, sError );
|
ScreenPrompt::Prompt( SM_None, sError );
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -754,8 +754,7 @@ void Song::SaveToSMFile( RString sPath, bool bSavingCache )
|
|||||||
if( !bSavingCache && IsAFile(sPath) )
|
if( !bSavingCache && IsAFile(sPath) )
|
||||||
FileCopy( sPath, sPath + ".old" );
|
FileCopy( sPath, sPath + ".old" );
|
||||||
|
|
||||||
NotesWriterSM wr;
|
NotesWriterSM::Write( sPath, *this, bSavingCache );
|
||||||
wr.Write( sPath, *this, bSavingCache );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Song::SaveToCacheFile()
|
void Song::SaveToCacheFile()
|
||||||
|
|||||||
Reference in New Issue
Block a user