[Orxonox-commit 3178] r7871 - code/trunk/src/libraries/core/command

rgrieder at orxonox.net rgrieder at orxonox.net
Sat Feb 12 19:39:30 CET 2011


Author: rgrieder
Date: 2011-02-12 19:39:29 +0100 (Sat, 12 Feb 2011)
New Revision: 7871

Modified:
   code/trunk/src/libraries/core/command/Functor.h
Log:
Fixed msvc build: Functor does not necessarily have to be parametrized with an OrxonoxClass.

Modified: code/trunk/src/libraries/core/command/Functor.h
===================================================================
--- code/trunk/src/libraries/core/command/Functor.h	2011-02-12 18:24:16 UTC (rev 7870)
+++ code/trunk/src/libraries/core/command/Functor.h	2011-02-12 18:39:29 UTC (rev 7871)
@@ -302,10 +302,10 @@
         protected:
             /// Casts the object and registers as destruction listener.
             inline void registerObject(O* object)
-                { OrxonoxClass* base = orxonox_cast<OrxonoxClass*>(object); if (base) { this->registerAsDestructionListener(base); } }
+                { OrxonoxClass* base = dynamic_cast<OrxonoxClass*>(object); if (base) { this->registerAsDestructionListener(base); } }
             /// Casts the object and unregisters as destruction listener.
             inline void unregisterObject(O* object)
-                { OrxonoxClass* base = orxonox_cast<OrxonoxClass*>(object); if (base) { this->unregisterAsDestructionListener(base); } }
+                { OrxonoxClass* base = dynamic_cast<OrxonoxClass*>(object); if (base) { this->unregisterAsDestructionListener(base); } }
 
             /// Will be called by OrxonoxClass::~OrxonoxClass() if the stored object is deleted and the Functor is in safe mode.
             inline void objectDeleted()




More information about the Orxonox-commit mailing list