fixed some Debug.h-related bugs which prevented to code from compiling
in non-debug mode
This commit is contained in:
parent
e130b16409
commit
a38ebdeadd
|
@ -35,6 +35,8 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <sys/time.h>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <XmlRpcValue.h>
|
||||
|
||||
#ifndef DEBUG_PREFIX
|
||||
#define CMP_PREFIX ""
|
||||
|
@ -100,7 +102,6 @@ using namespace LiveSupport::Core;
|
|||
* @return this stream
|
||||
*/
|
||||
NoDebugStream &operator<<(unsigned int ) { return *this; }
|
||||
|
||||
/**
|
||||
* Does nothing.
|
||||
* @return this stream
|
||||
|
@ -131,9 +132,29 @@ using namespace LiveSupport::Core;
|
|||
* @return this stream
|
||||
*/
|
||||
NoDebugStream& operator<<(unsigned long) { return *this; }
|
||||
|
||||
/**
|
||||
* Does nothing.
|
||||
* @return this stream
|
||||
*/
|
||||
NoDebugStream& operator<<(std::string) { return *this; }
|
||||
|
||||
/**
|
||||
* Does nothing.
|
||||
* @return this stream
|
||||
*/
|
||||
NoDebugStream& operator<<(boost::posix_time::ptime)
|
||||
{ return *this; }
|
||||
/**
|
||||
* Does nothing.
|
||||
* @return this stream
|
||||
*/
|
||||
NoDebugStream& operator<<(boost::posix_time::time_duration)
|
||||
{ return *this; }
|
||||
/**
|
||||
* Does nothing.
|
||||
* @return this stream
|
||||
*/
|
||||
NoDebugStream& operator<<(XmlRpc::XmlRpcValue)
|
||||
{ return *this; }
|
||||
};
|
||||
static inline NoDebugStream debug() { return NoDebugStream(); }
|
||||
static inline NoDebugStream warning() { return NoDebugStream(); }
|
||||
|
|
|
@ -99,7 +99,7 @@ SchedulerThread :: nextStep(Ptr<ptime>::Ref now) throw ()
|
|||
{
|
||||
if (nextEvent) {
|
||||
if (imminent(now, nextInitTime)) {
|
||||
debug() << "event init coming" << std::endl;
|
||||
debug() << "event init coming" << endl;
|
||||
try {
|
||||
nextEvent->initialize();
|
||||
} catch (std::exception &e) {
|
||||
|
@ -111,7 +111,7 @@ SchedulerThread :: nextStep(Ptr<ptime>::Ref now) throw ()
|
|||
<< std::endl;
|
||||
}
|
||||
} else if (imminent(now, nextEventTime)) {
|
||||
debug() << "event start coming" << std::endl;
|
||||
debug() << "event start coming" << endl;
|
||||
Ptr<time_duration>::Ref timeLeft(new time_duration(*nextEventTime
|
||||
- *now));
|
||||
TimeConversion::sleep(timeLeft);
|
||||
|
@ -123,7 +123,7 @@ SchedulerThread :: nextStep(Ptr<ptime>::Ref now) throw ()
|
|||
}
|
||||
|
||||
if (currentEvent && imminent(now, currentEventEnd)) {
|
||||
debug() << "event end coming" << std::endl;
|
||||
debug() << "event end coming" << endl;
|
||||
Ptr<time_duration>::Ref timeLeft(new time_duration(*currentEventEnd
|
||||
- *now));
|
||||
TimeConversion::sleep(timeLeft);
|
||||
|
|
Loading…
Reference in New Issue