diff options
Diffstat (limited to 'log.cpp')
-rw-r--r-- | log.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -22,12 +22,10 @@ logtofile& logtofile::operator<<(TCHAR *buf) if(bDebugLog) { log_mutex.lock(); - char *tmp = mir_utf8encodeW(buf); log.open(path, std::ios::app |std::ios::ate); - log<<tmp; + log<<toUTF8(buf); log.close(); log_mutex.unlock(); - mir_free(tmp); } return *this; } @@ -37,12 +35,10 @@ logtofile& logtofile::operator<<(char *buf) if(bDebugLog) { log_mutex.lock(); - char *tmp = mir_utf8encode(buf); log.open(path, std::ios::app |std::ios::ate); - log<<tmp; + log<<buf; log.close(); log_mutex.unlock(); - mir_free(tmp); } return *this; } @@ -67,12 +63,10 @@ logtofile& logtofile::operator<<(wstring buf) if(bDebugLog) { log_mutex.lock(); - char *tmp = mir_utf8encodeW(buf.c_str()); log.open(path, std::ios::app |std::ios::ate); - log<<tmp; + log<<toUTF8(buf); log.close(); log_mutex.unlock(); - mir_free(tmp); } return *this; } |