summaryrefslogtreecommitdiff
path: root/log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'log.cpp')
-rw-r--r--log.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/log.cpp b/log.cpp
index d4d65a7..a7395e6 100644
--- a/log.cpp
+++ b/log.cpp
@@ -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;
}