aboutsummaryrefslogtreecommitdiff
path: root/dep/g3dlite/source/Log.cpp
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-08-23 16:41:54 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-08-23 16:41:54 +0200
commit4a29c73403c4dc713a8a31cb96289adff2b910c1 (patch)
treede0c6b191031bac7fb2764edb2a81382a331f81c /dep/g3dlite/source/Log.cpp
parentb90329d63acaecb1f074dd2b303561baa9f639a2 (diff)
parent1255434882777053bca06656786abc1a598deda9 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'dep/g3dlite/source/Log.cpp')
-rw-r--r--dep/g3dlite/source/Log.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/dep/g3dlite/source/Log.cpp b/dep/g3dlite/source/Log.cpp
index f437351cfbd..c113b0b0f79 100644
--- a/dep/g3dlite/source/Log.cpp
+++ b/dep/g3dlite/source/Log.cpp
@@ -14,7 +14,7 @@
#include "G3D/FileSystem.h"
#include <time.h>
-#ifdef G3D_WIN32
+#ifdef G3D_WINDOWS
#include <imagehlp.h>
#else
#include <stdarg.h>
@@ -23,16 +23,16 @@
namespace G3D {
void logPrintf(const char* fmt, ...) {
- va_list arg_list;
- va_start(arg_list, fmt);
+ va_list arg_list;
+ va_start(arg_list, fmt);
Log::common()->vprintf(fmt, arg_list);
va_end(arg_list);
}
void logLazyPrintf(const char* fmt, ...) {
- va_list arg_list;
- va_start(arg_list, fmt);
+ va_list arg_list;
+ va_start(arg_list, fmt);
Log::common()->lazyvprintf(fmt, arg_list);
va_end(arg_list);
}
@@ -53,7 +53,7 @@ Log::Log(const std::string& filename, int stripFromStackBottom) :
std::string logName = base + ((ext != "") ? ("." + ext) : "");
// Write time is greater than 1ms. This may be a network drive.... try another file.
- #ifdef G3D_WIN32
+ #ifdef G3D_WINDOWS
logName = std::string(std::getenv("TEMP")) + logName;
#else
logName = std::string("/tmp/") + logName;
@@ -86,7 +86,9 @@ Log::~Log() {
Log::commonLog = NULL;
}
- fclose(logFile);
+ if (logFile) {
+ FileSystem::fclose(logFile);
+ }
}