mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-02-14 19:44:15 +01:00
Slightly more efficient.
This commit is contained in:
parent
27d099c5b7
commit
8a5b810c5e
3
Log.cpp
3
Log.cpp
|
|
@ -164,10 +164,11 @@ void Log(unsigned int level, const char* fmt, ...)
|
|||
::sprintf(buffer, "%c: %04d-%02d-%02d %02d:%02d:%02d.%03lld ", LEVELS[level], tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, now.tv_usec / 1000LL);
|
||||
#endif
|
||||
|
||||
size_t bufLen = ::strlen(buffer);
|
||||
va_list vl;
|
||||
va_start(vl, fmt);
|
||||
|
||||
::vsnprintf((buffer + ::strlen(buffer)), (500U - ::strlen(buffer)), fmt, vl);
|
||||
::vsnprintf((buffer + bufLen), (500U - bufLen), fmt, vl);
|
||||
|
||||
va_end(vl);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue