diff options
Diffstat (limited to '')
-rw-r--r-- | source/Log.cpp | 2 | ||||
-rw-r--r-- | source/MCLogger.cpp | 14 | ||||
-rw-r--r-- | source/MCLogger.h | 4 |
3 files changed, 12 insertions, 8 deletions
diff --git a/source/Log.cpp b/source/Log.cpp index 42c58eb27..ed1a9beb8 100644 --- a/source/Log.cpp +++ b/source/Log.cpp @@ -138,7 +138,7 @@ void cLog::Log(const char * a_Format, va_list argList) #if defined (_WIN32) && defined(_DEBUG) // In a Windows Debug build, output the log to debug console as well: - OutputDebugString(Line.c_str()); + OutputDebugStringA(Line.c_str()); #endif // _WIN32 } diff --git a/source/MCLogger.cpp b/source/MCLogger.cpp index daf43f796..94a2ea1c7 100644 --- a/source/MCLogger.cpp +++ b/source/MCLogger.cpp @@ -8,7 +8,11 @@ -cMCLogger* cMCLogger::s_MCLogger = 0; +cMCLogger * cMCLogger::s_MCLogger = NULL; + + + + cMCLogger* cMCLogger::GetInstance() { @@ -19,10 +23,10 @@ cMCLogger* cMCLogger::GetInstance() -cMCLogger::cMCLogger() +cMCLogger::cMCLogger(void) { AString FileName; - Printf(FileName, "LOG_%d.txt", (int)time(0) ); + Printf(FileName, "LOG_%d.txt", (int)time(NULL)); m_Log = new cLog(FileName); m_Log->Log("--- Started Log ---"); @@ -33,9 +37,9 @@ cMCLogger::cMCLogger() -cMCLogger::cMCLogger( char* a_File ) +cMCLogger::cMCLogger(const AString & a_FileName) { - m_Log = new cLog( a_File ); + m_Log = new cLog(a_FileName); } diff --git a/source/MCLogger.h b/source/MCLogger.h index e918de37c..0c4566400 100644 --- a/source/MCLogger.h +++ b/source/MCLogger.h @@ -13,8 +13,8 @@ class cLog; class cMCLogger // tolua_export { // tolua_export public: // tolua_export - cMCLogger(); - cMCLogger( char* a_File ); // tolua_export + cMCLogger(void); + cMCLogger(const AString & a_FileName); // tolua_export ~cMCLogger(); // tolua_export void Log(const char* a_Format, va_list a_ArgList); |