Fixed compilation error
This commit is contained in:
@@ -14,18 +14,9 @@ private:
|
||||
static boost::mutex mMutex;
|
||||
|
||||
public:
|
||||
static void add(const std::string& s) {
|
||||
boost::mutex::scoped_lock lock(mMutex);
|
||||
stream << s << "\n";
|
||||
}
|
||||
static void debugAndClear() {
|
||||
stream.flush();
|
||||
qDebug("%s", stream.str().c_str());
|
||||
stream.str("");
|
||||
}
|
||||
static void clear() {
|
||||
stream.str("");
|
||||
}
|
||||
static void add(const std::string& s);
|
||||
static void debugAndClear();
|
||||
static void clear();
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,22 @@
|
||||
#include "../include/OutputCapturer.h"
|
||||
|
||||
std::ostringstream OutputCapturer::stream;
|
||||
boost::mutex mMutex;
|
||||
boost::mutex OutputCapturer::mMutex;
|
||||
|
||||
void OutputCapturer::add(const std::string& s)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(mMutex);
|
||||
stream << s << "\n";
|
||||
}
|
||||
|
||||
void OutputCapturer::debugAndClear()
|
||||
{
|
||||
stream.flush();
|
||||
qDebug("%s", stream.str().c_str());
|
||||
stream.str("");
|
||||
}
|
||||
|
||||
void OutputCapturer::clear()
|
||||
{
|
||||
stream.str("");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user