changeset 1481:0356a84be1cf

uses std funcs instead
author Beri Levi berilevi@gmail.com
date Wed, 28 Aug 2013 23:47:39 +0300
parents 61451d5980bf
children 223605b325b3
files Log.cpp
diffstat 1 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Log.cpp	Wed Aug 28 22:10:13 2013 +0200
+++ b/Log.cpp	Wed Aug 28 23:47:39 2013 +0300
@@ -1,13 +1,11 @@
 #include "Log.h"
 
-
 #include <stdio.h>
 #include <windows.h>
+
 HANDLE hStdOut = nullptr;
 
 
-
-
 void Log::Initialize()
 {
   if (AllocConsole())
@@ -21,15 +19,12 @@
     return;
 
   va_list args;
-  wchar_t pMsg[8192];
 
   va_start(args, pFormat);
-  vswprintf_s(pMsg, 8192, pFormat, args);
+  vwprintf_s(pFormat, args);
   va_end(args);
+  puts("\r\n");
 
-  DWORD w;
-  WriteConsole(hStdOut, pMsg, lstrlenW(pMsg), &w, nullptr);
-  WriteConsole(hStdOut, L"\r\n", 2, &w, nullptr);
 }
 
 //----- (004BE386) --------------------------------------------------------