Commit 3fd86d605d8de8f6dc6a23876c3e457c999ccdba

Authored by David René
1 parent 3b4e8105

Fix some typo and warning

Showing 1 changed file with 8 additions and 8 deletions   Show diff stats
anubis_dev/share/DebugLog.cpp
... ... @@ -8,7 +8,7 @@
8 8  
9 9 #include <stdarg.h>
10 10 #include <stdio.h>
11   -#include <string.h>
  11 +#include <string>
12 12 #include <stdlib.h>
13 13 #include "DebugLog.h"
14 14 #include <time.h>
... ... @@ -19,16 +19,16 @@
19 19  
20 20  
21 21  
22   -void LogInfo(const char *format, ...)
  22 +void LogInfo(std::string format, ...)
23 23 {
24 24 char buf[32768];
25 25 va_list ap;
26 26 va_start (ap, format);
27 27  
28 28 #ifdef WIN32
29   - int ret = _vsnprintf(buf, 32768, format, ap);
  29 + int ret = _vsnprintf(buf, 32768, format.c_str(), ap);
30 30 #else
31   - int ret = vsnprintf(buf, 32768, format, ap);
  31 + int ret = vsnprintf(buf, 32768, format.c_str(), ap);
32 32 #endif
33 33  
34 34 if (ret < 0)
... ... @@ -39,16 +39,16 @@ void LogInfo(const char *format, ...)
39 39 Log(stdout, buf);
40 40 }
41 41  
42   -void LogError(const char *format, ...)
  42 +void LogError(std::string format, ...)
43 43 {
44 44 char buf[32768];
45 45 va_list ap;
46 46 va_start (ap, format);
47 47  
48 48 #ifdef WIN32
49   - int ret = _vsnprintf(buf, 32768, format, ap);
  49 + int ret = _vsnprintf(buf, 32768, format.c_str(), ap);
50 50 #else
51   - int ret = vsnprintf(buf, 32768, format, ap);
  51 + int ret = vsnprintf(buf, 32768, format.c_str(), ap);
52 52 #endif
53 53  
54 54 if (ret < 0)
... ... @@ -59,7 +59,7 @@ void LogError(const char *format, ...)
59 59 Log(stderr, buf);
60 60 }
61 61  
62   -void Log(FILE * output, char *logString)
  62 +void Log(FILE * output, const char *logString)
63 63 {
64 64 //Ecris sur la console fenetre
65 65 #if defined (__BEOS__) || (_LINUX_) || (WIN32)
... ...