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