From 2c214603e29f728804cd88522a1097de803ab321 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 3 Feb 2013 20:37:13 +0000 Subject: BiomeVisualiser: initial import git-svn-id: http://mc-server.googlecode.com/svn/trunk@1192 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Log.cpp | 2 +- source/MCLogger.cpp | 14 +++++++++----- source/MCLogger.h | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) (limited to 'source') 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); -- cgit v1.2.3