summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-03 21:37:13 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-03 21:37:13 +0100
commit2c214603e29f728804cd88522a1097de803ab321 (patch)
treea44010a49f1ef59b727982344c04aa8935d97564 /source
parentAdded a GetClassStatic function to all entities, as well as cFurnaceEntity, cChestEntity and cWorld (diff)
downloadcuberite-2c214603e29f728804cd88522a1097de803ab321.tar
cuberite-2c214603e29f728804cd88522a1097de803ab321.tar.gz
cuberite-2c214603e29f728804cd88522a1097de803ab321.tar.bz2
cuberite-2c214603e29f728804cd88522a1097de803ab321.tar.lz
cuberite-2c214603e29f728804cd88522a1097de803ab321.tar.xz
cuberite-2c214603e29f728804cd88522a1097de803ab321.tar.zst
cuberite-2c214603e29f728804cd88522a1097de803ab321.zip
Diffstat (limited to 'source')
-rw-r--r--source/Log.cpp2
-rw-r--r--source/MCLogger.cpp14
-rw-r--r--source/MCLogger.h4
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);