From a38ebdeadd992dd1ad561902f7159f071d66c1b5 Mon Sep 17 00:00:00 2001
From: fgerlits <fgerlits@cfc7b370-4200-0410-a6e3-cb6bdb053afe>
Date: Fri, 1 Dec 2006 14:54:14 +0000
Subject: [PATCH] fixed some Debug.h-related bugs which prevented to code from
 compiling in non-debug mode

---
 .../core/include/LiveSupport/Core/Debug.h     | 27 ++++++++++++++++---
 .../eventScheduler/src/SchedulerThread.cxx    |  6 ++---
 2 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/campcaster/src/modules/core/include/LiveSupport/Core/Debug.h b/campcaster/src/modules/core/include/LiveSupport/Core/Debug.h
index e9f8da856..640d2bf3b 100644
--- a/campcaster/src/modules/core/include/LiveSupport/Core/Debug.h
+++ b/campcaster/src/modules/core/include/LiveSupport/Core/Debug.h
@@ -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(); }
diff --git a/campcaster/src/modules/eventScheduler/src/SchedulerThread.cxx b/campcaster/src/modules/eventScheduler/src/SchedulerThread.cxx
index e63fbd1ae..0c2735d5a 100644
--- a/campcaster/src/modules/eventScheduler/src/SchedulerThread.cxx
+++ b/campcaster/src/modules/eventScheduler/src/SchedulerThread.cxx
@@ -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);