rm Report::vprint
This commit is contained in:
parent
ce76f3a3ee
commit
83ed72cd3a
|
|
@ -42,12 +42,10 @@ public:
|
|||
// Return the number of characters written.
|
||||
virtual size_t printString(const char *buffer,
|
||||
size_t length);
|
||||
virtual void vprint(const char *fmt,
|
||||
va_list args);
|
||||
// Print line with return.
|
||||
virtual void reportLine(const char *fmt, ...);
|
||||
virtual void reportLineString(const char *line);
|
||||
void reportLine(const string &line);
|
||||
virtual void reportLine(const string &line);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
|||
|
|
@ -62,21 +62,14 @@ Report::printString(const char *buffer,
|
|||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
Report::vprint(const char *fmt,
|
||||
va_list args)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(buffer_lock_);
|
||||
printToBuffer(fmt, args);
|
||||
printString(buffer_, buffer_length_);
|
||||
}
|
||||
|
||||
void
|
||||
Report::reportLine(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vprint(fmt, args);
|
||||
std::unique_lock<std::mutex> lock(buffer_lock_);
|
||||
printToBuffer(fmt, args);
|
||||
printString(buffer_, buffer_length_);
|
||||
printString("\n", 1);
|
||||
va_end(args);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue