name cleanup

"foo() ;" cleanup (itchy spacebar?)
This commit is contained in:
Glenn Maynard
2004-02-27 00:56:51 +00:00
parent 0a8899f4d8
commit 56654496ef
5 changed files with 21 additions and 22 deletions
+3 -3
View File
@@ -258,7 +258,7 @@ PrefsManager::PrefsManager()
m_sCoursesToShowRanking = ""; m_sCoursesToShowRanking = "";
m_bLogging = true; m_bLogToDisk = true;
m_bForceLogFlush = false; m_bForceLogFlush = false;
#ifdef DEBUG #ifdef DEBUG
m_bShowLogOutput = true; m_bShowLogOutput = true;
@@ -502,7 +502,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
FixSlashesInPlace(m_sAdditionalSongFolders); FixSlashesInPlace(m_sAdditionalSongFolders);
FixSlashesInPlace(m_sAdditionalFolders); FixSlashesInPlace(m_sAdditionalFolders);
ini.GetValue( "Debug", "Logging", m_bLogging ); ini.GetValue( "Debug", "LogToDisk", m_bLogToDisk );
ini.GetValue( "Debug", "ForceLogFlush", m_bForceLogFlush ); ini.GetValue( "Debug", "ForceLogFlush", m_bForceLogFlush );
ini.GetValue( "Debug", "ShowLogOutput", m_bShowLogOutput ); ini.GetValue( "Debug", "ShowLogOutput", m_bShowLogOutput );
ini.GetValue( "Debug", "Timestamping", m_bTimestamping ); ini.GetValue( "Debug", "Timestamping", m_bTimestamping );
@@ -726,7 +726,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "AdditionalSongFolders", m_sAdditionalSongFolders); ini.SetValue( "Options", "AdditionalSongFolders", m_sAdditionalSongFolders);
ini.SetValue( "Options", "AdditionalFolders", m_sAdditionalFolders); ini.SetValue( "Options", "AdditionalFolders", m_sAdditionalFolders);
ini.SetValue( "Debug", "Logging", m_bLogging ); ini.SetValue( "Debug", "LogToDisk", m_bLogToDisk );
ini.SetValue( "Debug", "ForceLogFlush", m_bForceLogFlush ); ini.SetValue( "Debug", "ForceLogFlush", m_bForceLogFlush );
ini.SetValue( "Debug", "ShowLogOutput", m_bShowLogOutput ); ini.SetValue( "Debug", "ShowLogOutput", m_bShowLogOutput );
ini.SetValue( "Debug", "Timestamping", m_bTimestamping ); ini.SetValue( "Debug", "Timestamping", m_bTimestamping );
+1 -1
View File
@@ -239,7 +239,7 @@ public:
CString m_sCoursesToShowRanking; CString m_sCoursesToShowRanking;
/* Debug: */ /* Debug: */
bool m_bLogging; bool m_bLogToDisk;
bool m_bForceLogFlush; bool m_bForceLogFlush;
bool m_bShowLogOutput; bool m_bShowLogOutput;
bool m_bTimestamping; bool m_bTimestamping;
+8 -8
View File
@@ -101,7 +101,7 @@ RageLog::RageLog()
g_Mutex = new RageMutex; g_Mutex = new RageMutex;
m_bEnabled = true; m_bLogToDisk = true;
m_bFlush = false; m_bFlush = false;
m_bTimestamping = false; m_bTimestamping = false;
m_bShowLogOutput = false; m_bShowLogOutput = false;
@@ -147,7 +147,7 @@ RageLog::~RageLog()
} }
Flush(); Flush();
ShowLogOutput( false ); SetShowLogOutput( false );
g_fileLog->Close(); g_fileLog->Close();
g_fileInfo->Close(); g_fileInfo->Close();
@@ -160,9 +160,9 @@ RageLog::~RageLog()
g_fileInfo = NULL; g_fileInfo = NULL;
} }
void RageLog::SetLogging( bool b ) void RageLog::SetLogToDisk( bool b )
{ {
m_bEnabled = b; m_bLogToDisk = b;
} }
void RageLog::SetFlushing( bool b ) void RageLog::SetFlushing( bool b )
@@ -176,7 +176,7 @@ void RageLog::SetTimestamping( bool b )
} }
/* Enable or disable display of output to stdout, or a console window in Windows. */ /* Enable or disable display of output to stdout, or a console window in Windows. */
void RageLog::ShowLogOutput( bool show ) void RageLog::SetShowLogOutput( bool show )
{ {
m_bShowLogOutput = show; m_bShowLogOutput = show;
@@ -197,7 +197,7 @@ void RageLog::ShowLogOutput( bool show )
void RageLog::Trace( const char *fmt, ...) void RageLog::Trace( const char *fmt, ...)
{ {
if( !m_bEnabled ) if( !m_bLogToDisk )
return; return;
va_list va; va_list va;
@@ -212,7 +212,7 @@ void RageLog::Trace( const char *fmt, ...)
* in crash dumps. */ * in crash dumps. */
void RageLog::Info( const char *fmt, ...) void RageLog::Info( const char *fmt, ...)
{ {
if( !m_bEnabled ) if( !m_bLogToDisk )
return; return;
va_list va; va_list va;
@@ -225,7 +225,7 @@ void RageLog::Info( const char *fmt, ...)
void RageLog::Warn( const char *fmt, ...) void RageLog::Warn( const char *fmt, ...)
{ {
if( !m_bEnabled ) if( !m_bLogToDisk )
return; return;
va_list va; va_list va;
+3 -4
View File
@@ -23,8 +23,6 @@ public:
void Info( const char *fmt, ...) PRINTF(2,3); void Info( const char *fmt, ...) PRINTF(2,3);
void Flush(); void Flush();
void ShowLogOutput( bool show );
void MapLog( const CString &key, const char *fmt, ... ) PRINTF(3,4); void MapLog( const CString &key, const char *fmt, ... ) PRINTF(3,4);
void UnmapLog( const CString &key ); void UnmapLog( const CString &key );
@@ -33,12 +31,13 @@ public:
/* Returns NULL if past the last recent log. */ /* Returns NULL if past the last recent log. */
static const char *GetRecentLog( int n ); static const char *GetRecentLog( int n );
void SetLogging( bool b ); // enable or disable logging void SetShowLogOutput( bool show ); // enable or disable logging to stdout
void SetLogToDisk( bool b ); // enable or disable logging to file
void SetFlushing( bool b ); // enable or disable flushing void SetFlushing( bool b ); // enable or disable flushing
void SetTimestamping( bool b ); // enable or disable timestamping void SetTimestamping( bool b ); // enable or disable timestamping
private: private:
bool m_bEnabled; bool m_bLogToDisk;
bool m_bFlush; bool m_bFlush;
bool m_bTimestamping; bool m_bTimestamping;
bool m_bShowLogOutput; bool m_bShowLogOutput;
+2 -2
View File
@@ -923,8 +923,8 @@ int main(int argc, char* argv[])
// //
GAMESTATE = new GameState; GAMESTATE = new GameState;
LOG->ShowLogOutput( PREFSMAN->m_bShowLogOutput ); LOG->SetShowLogOutput( PREFSMAN->m_bShowLogOutput );
LOG->SetLogging( PREFSMAN->m_bLogging ); LOG->SetLogToDisk( PREFSMAN->m_bLogToDisk );
LOG->SetFlushing( PREFSMAN->m_bForceLogFlush ); LOG->SetFlushing( PREFSMAN->m_bForceLogFlush );
LOG->SetTimestamping( PREFSMAN->m_bTimestamping ); LOG->SetTimestamping( PREFSMAN->m_bTimestamping );
Checkpoints::LogCheckpoints( PREFSMAN->m_bLogCheckpoints ); Checkpoints::LogCheckpoints( PREFSMAN->m_bLogCheckpoints );