Move Format issues
This commit is contained in:
parent
f64f879027
commit
a19f5fc484
@ -17,7 +17,7 @@ public:
|
|||||||
virtual ~cCommandOutputCallback() {}; // Force a virtual destructor in subclasses
|
virtual ~cCommandOutputCallback() {}; // Force a virtual destructor in subclasses
|
||||||
|
|
||||||
/// Syntax sugar function, calls Out() with Printf()-ed parameters; appends a "\n"
|
/// Syntax sugar function, calls Out() with Printf()-ed parameters; appends a "\n"
|
||||||
void Out(const char * a_Fmt, ...);
|
void Out(const char * a_Fmt, ...) FORMATSTRING(2,3);
|
||||||
|
|
||||||
/// Called when the command wants to output anything; may be called multiple times
|
/// Called when the command wants to output anything; may be called multiple times
|
||||||
virtual void Out(const AString & a_Text) = 0;
|
virtual void Out(const AString & a_Text) = 0;
|
||||||
|
@ -118,7 +118,7 @@ void cLog::Log(const char * a_Format, va_list argList)
|
|||||||
|
|
||||||
AString Line;
|
AString Line;
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
Printf(Line, "[%04x|%02d:%02d:%02d] %s", cIsThread::GetCurrentID(), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
|
Printf(Line, "[%04zu|%02d:%02d:%02d] %s", cIsThread::GetCurrentID(), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
|
||||||
#else
|
#else
|
||||||
Printf(Line, "[%02d:%02d:%02d] %s", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
|
Printf(Line, "[%02d:%02d:%02d] %s", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,8 +14,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
cLog(const AString & a_FileName);
|
cLog(const AString & a_FileName);
|
||||||
~cLog();
|
~cLog();
|
||||||
void Log(const char * a_Format, va_list argList);
|
void Log(const char * a_Format, va_list argList) FORMATSTRING(2,0);
|
||||||
void Log(const char * a_Format, ...);
|
void Log(const char * a_Format, ...) FORMATSTRING(2,3);
|
||||||
// tolua_begin
|
// tolua_begin
|
||||||
void SimpleLog(const char * a_String);
|
void SimpleLog(const char * a_String);
|
||||||
void OpenLog(const char * a_FileName);
|
void OpenLog(const char * a_FileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user