This commit is contained in:
Glenn Maynard
2003-12-29 23:37:55 +00:00
parent c8e4d02641
commit 0ae51ca247
2 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -219,7 +219,7 @@ void RageLog::Warn( const char *fmt, ...)
Write( WRITE_TO_INFO | WRITE_LOUD, sBuff );
}
void RageLog::Write( int where, CString line )
void RageLog::Write( int where, const CString &line )
{
vector<CString> lines;
split( line, "\n", lines, false );
@@ -286,7 +286,7 @@ void RageLog::Flush()
static char staticlog[1024*32]="";
static CString staticlog_buf;
void RageLog::AddToInfo( CString str )
void RageLog::AddToInfo( const CString &str )
{
int old_len = staticlog_buf.size();
staticlog_buf += str + NEWLINE;
@@ -314,7 +314,7 @@ const char *RageLog::GetInfo()
static const int BACKLOG_LINES = 10;
static char backlog[BACKLOG_LINES][1024];
static int backlog_start=0, backlog_cnt=0;
void RageLog::AddToRecentLogs( CString str )
void RageLog::AddToRecentLogs( const CString &str )
{
unsigned len = str.size();
if(len > sizeof(backlog[backlog_start])-1)
+5 -5
View File
@@ -25,8 +25,8 @@ public:
void ShowLogOutput( bool show );
void MapLog(const CString &key, const char *fmt, ...) PRINTF(3,4);
void UnmapLog(const CString &key);
void MapLog( const CString &key, const char *fmt, ... ) PRINTF(3,4);
void UnmapLog( const CString &key );
static const char *GetAdditionalLog();
static const char *GetInfo();
@@ -42,10 +42,10 @@ private:
bool m_bFlush;
bool m_bTimestamping;
bool m_bShowLogOutput;
void Write( int, CString );
void Write( int, const CString &str );
void UpdateMappedLog();
void AddToInfo( CString buf );
void AddToRecentLogs( CString buf );
void AddToInfo( const CString &buf );
void AddToRecentLogs( const CString &buf );
};
extern RageLog* LOG; // global and accessable from anywhere in our program