[Orxonox-commit 699] r3231 - in branches/netp6/src: core util

rgrieder at orxonox.net rgrieder at orxonox.net
Tue Jun 23 21:59:04 CEST 2009


Author: rgrieder
Date: 2009-06-23 21:59:04 +0200 (Tue, 23 Jun 2009)
New Revision: 3231

Modified:
   branches/netp6/src/core/CorePrereqs.h
   branches/netp6/src/core/Thread.cc
   branches/netp6/src/core/Thread.h
   branches/netp6/src/core/ThreadPool.cc
   branches/netp6/src/core/ThreadPool.h
   branches/netp6/src/util/UtilPrereqs.h
Log:
Build fixes: Classes should export symbols with _CoreExport and functions with return values should return something.

Modified: branches/netp6/src/core/CorePrereqs.h
===================================================================
--- branches/netp6/src/core/CorePrereqs.h	2009-06-23 19:45:35 UTC (rev 3230)
+++ branches/netp6/src/core/CorePrereqs.h	2009-06-23 19:59:04 UTC (rev 3231)
@@ -199,7 +199,8 @@
 }
 
 // Boost
-namespace boost { 
+namespace boost
+{ 
     namespace filesystem
     {
         struct path_traits;

Modified: branches/netp6/src/core/Thread.cc
===================================================================
--- branches/netp6/src/core/Thread.cc	2009-06-23 19:45:35 UTC (rev 3230)
+++ branches/netp6/src/core/Thread.cc	2009-06-23 19:59:04 UTC (rev 3231)
@@ -34,8 +34,8 @@
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/thread_time.hpp>
 
-#include "core/Functor.h"
 #include "util/Sleep.h"
+#include "Functor.h"
 
 namespace orxonox
 {

Modified: branches/netp6/src/core/Thread.h
===================================================================
--- branches/netp6/src/core/Thread.h	2009-06-23 19:45:35 UTC (rev 3230)
+++ branches/netp6/src/core/Thread.h	2009-06-23 19:59:04 UTC (rev 3231)
@@ -29,22 +29,20 @@
 #ifndef _Thread_H__
 #define _Thread_H__
 
-
 #include "CorePrereqs.h"
 
  namespace orxonox
 {
-    
-    class Thread
+    class _CoreExport Thread
     {
     public:
         Thread();
         virtual ~Thread();
-        
-        inline  bool isWorking(){ return this->isWorking_; }
+
+        inline bool isWorking() { return this->isWorking_; }
         void waitUntilFinished();
         bool evaluateFunctor( Functor* functor );
-        
+
     private:
         void            threadLoop();
         
@@ -54,8 +52,7 @@
         boost::thread*  workerThread_;
         boost::mutex*   communicationMutex_;
     };
-    
-}
 
+ }
 
-#endif
+#endif /* _Thread_H__ */

Modified: branches/netp6/src/core/ThreadPool.cc
===================================================================
--- branches/netp6/src/core/ThreadPool.cc	2009-06-23 19:45:35 UTC (rev 3230)
+++ branches/netp6/src/core/ThreadPool.cc	2009-06-23 19:59:04 UTC (rev 3231)
@@ -27,14 +27,11 @@
  */
 
 #include "ThreadPool.h"
-
 #include <cassert>
 
-
 namespace orxonox
 {
-    
-    
+
     ThreadPool::ThreadPool()
     {
     }
@@ -60,6 +57,7 @@
                 ++i;
             }
         }
+        return i;
     }
     unsigned int ThreadPool::setNrOfThreads( unsigned int nr )
     {

Modified: branches/netp6/src/core/ThreadPool.h
===================================================================
--- branches/netp6/src/core/ThreadPool.h	2009-06-23 19:45:35 UTC (rev 3230)
+++ branches/netp6/src/core/ThreadPool.h	2009-06-23 19:59:04 UTC (rev 3231)
@@ -29,14 +29,14 @@
 #ifndef _ThreadPool_H__
 #define _ThreadPool_H__
 
-#include <vector>
+#include "CorePrereqs.h"
 
+#include <vector>
 #include "Thread.h"
 
  namespace orxonox
 {
-    
-    class ThreadPool
+    class _CoreExport ThreadPool
     {
     public:
         ThreadPool();
@@ -50,11 +50,9 @@
         void synchronise();
         
     private:
-        std::vector<Thread>     threadPool_;
+        std::vector<Thread> threadPool_;
         
     };
-    
 }
 
-
-#endif
+#endif /* _ThreadPool_H__ */

Modified: branches/netp6/src/util/UtilPrereqs.h
===================================================================
--- branches/netp6/src/util/UtilPrereqs.h	2009-06-23 19:45:35 UTC (rev 3230)
+++ branches/netp6/src/util/UtilPrereqs.h	2009-06-23 19:59:04 UTC (rev 3231)
@@ -59,7 +59,6 @@
 //-----------------------------------------------------------------------
 // Forward declarations
 //-----------------------------------------------------------------------
-
 namespace Ogre
 {
     class Radian;




More information about the Orxonox-commit mailing list