[Orxonox-commit 627] r3159 - in branches/pch: cmake src/core src/orxonox/objects/worldentities src/orxonox/objects/worldentities/triggers src/util

rgrieder at orxonox.net rgrieder at orxonox.net
Sat Jun 13 18:41:05 CEST 2009


Author: rgrieder
Date: 2009-06-13 18:41:05 +0200 (Sat, 13 Jun 2009)
New Revision: 3159

Modified:
   branches/pch/cmake/GenerateToluaBindings.cmake
   branches/pch/cmake/LibraryConfig.cmake
   branches/pch/src/core/Game.h
   branches/pch/src/core/IRC.h
   branches/pch/src/core/Template.cc
   branches/pch/src/core/XMLPort.h
   branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc
   branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc
   branches/pch/src/util/ExprParser.cc
   branches/pch/src/util/SignalHandler.cc
Log:
Several small fixes and some removed warnings

Modified: branches/pch/cmake/GenerateToluaBindings.cmake
===================================================================
--- branches/pch/cmake/GenerateToluaBindings.cmake	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/cmake/GenerateToluaBindings.cmake	2009-06-13 16:41:05 UTC (rev 3159)
@@ -47,6 +47,10 @@
     PARENT_SCOPE
   )
   SOURCE_GROUP("Tolua" FILES ${_tolua_cxxfile} ${_tolua_hfile})
+  # Disable annoying GCC warnings
+  IF(CMAKE_COMPILER_IS_GNU)
+    SET_SOURCE_FILES_PROPERTIES(${_tolua_cxxfile} PROPERTIES COMPILE_FLAGS "-w")
+  ENDIF()
 
   # Create temporary package file
   FILE(REMOVE ${_tolua_pkgfile})

Modified: branches/pch/cmake/LibraryConfig.cmake
===================================================================
--- branches/pch/cmake/LibraryConfig.cmake	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/cmake/LibraryConfig.cmake	2009-06-13 16:41:05 UTC (rev 3159)
@@ -171,7 +171,7 @@
 
 ##### Boost #####
 # Expand the next statement if newer boost versions than 1.36.1 are released
-SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0)
+SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0 1.38 1.38.0 1.39 1.39.0)
 # MSVC seems to be the only compiler requiring date_time
 IF(MSVC)
   FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem date_time)

Modified: branches/pch/src/core/Game.h
===================================================================
--- branches/pch/src/core/Game.h	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/src/core/Game.h	2009-06-13 16:41:05 UTC (rev 3159)
@@ -40,6 +40,7 @@
 #include <cassert>
 #include <list>
 #include <map>
+#include <string>
 #include <vector>
 #include <boost/shared_ptr.hpp>
 

Modified: branches/pch/src/core/IRC.h
===================================================================
--- branches/pch/src/core/IRC.h	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/src/core/IRC.h	2009-06-13 16:41:05 UTC (rev 3159)
@@ -30,6 +30,8 @@
 #define _IRC_H__
 
 #include "CorePrereqs.h"
+
+#include <string>
 #include "OrxonoxClass.h"
 
 namespace orxonox

Modified: branches/pch/src/core/Template.cc
===================================================================
--- branches/pch/src/core/Template.cc	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/src/core/Template.cc	2009-06-13 16:41:05 UTC (rev 3159)
@@ -41,9 +41,10 @@
 
     Template::Template(BaseObject* creator) : BaseObject(creator)
     {
+        this->xmlelement_ = new TiXmlElement("");
+
         RegisterObject(Template);
 
-        this->xmlelement_ = new TiXmlElement("");
         this->bIsLink_ = false;
         this->bLoadDefaults_ = true;
         this->bIsReturningXMLElement_ = false;

Modified: branches/pch/src/core/XMLPort.h
===================================================================
--- branches/pch/src/core/XMLPort.h	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/src/core/XMLPort.h	2009-06-13 16:41:05 UTC (rev 3159)
@@ -50,6 +50,7 @@
 #include "util/Exception.h"
 #include "util/MultiType.h"
 #include "util/OrxAssert.h"
+#include "Factory.h"
 #include "Identifier.h"
 #include "Executor.h"
 #include "BaseObject.h"

Modified: branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc	2009-06-13 16:41:05 UTC (rev 3159)
@@ -632,7 +632,7 @@
     */
     void WorldEntity::lookAt(const Vector3& target, TransformSpace::Enum relativeTo, const Vector3& localDirectionVector)
     {
-        Vector3 origin;
+        Vector3 origin(0, 0, 0);
         switch (relativeTo)
         {
         case TransformSpace::Local:
@@ -659,7 +659,7 @@
     void WorldEntity::setDirection(const Vector3& direction, TransformSpace::Enum relativeTo, const Vector3& localDirectionVector)
     {
         Quaternion savedOrientation(this->getOrientation());
-        Ogre::Node::TransformSpace ogreRelativeTo;
+        Ogre::Node::TransformSpace ogreRelativeTo = Ogre::Node::TS_LOCAL;
         switch (relativeTo)
         {
         case TransformSpace::Local:
@@ -771,10 +771,10 @@
             this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT & !btCollisionObject::CF_KINEMATIC_OBJECT);
             break;
         case Kinematic:
-            this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT | btCollisionObject::CF_KINEMATIC_OBJECT);
+            this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT) | btCollisionObject::CF_KINEMATIC_OBJECT);
             break;
         case Static:
-            this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT | btCollisionObject::CF_STATIC_OBJECT);
+            this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT) | btCollisionObject::CF_STATIC_OBJECT);
             break;
         case None:
             assert(false); // Doesn't happen

Modified: branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc	2009-06-13 16:41:05 UTC (rev 3159)
@@ -236,7 +236,7 @@
   bool Trigger::switchState()
   {
     if (( (this->latestState_ & 2) && this->bStayActive_ && (this->remainingActivations_ <= 0))
-     || (!(this->latestState_ & 2))                      && (this->remainingActivations_ == 0))
+     || (!(this->latestState_ & 2)                       && (this->remainingActivations_ == 0)))
       return false;
     else
     {

Modified: branches/pch/src/util/ExprParser.cc
===================================================================
--- branches/pch/src/util/ExprParser.cc	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/src/util/ExprParser.cc	2009-06-13 16:41:05 UTC (rev 3159)
@@ -246,11 +246,11 @@
             this->failed_ = true;
             return 0;
         }
-        else if (*reading_stream > 47 && *reading_stream < 59 || *reading_stream == 46)
+        else if ((*reading_stream > 47 && *reading_stream < 59) || *reading_stream == 46)
         {  // number
             value = strtod(reading_stream, const_cast<char**>(&reading_stream));
         }
-        else if (*reading_stream > 64 && *reading_stream < 91 || *reading_stream > 96 && *reading_stream < 123 || *reading_stream == 46)
+        else if ((*reading_stream > 64 && *reading_stream < 91) || (*reading_stream > 96 && *reading_stream < 123) || *reading_stream == 46)
         {  // variable or function
             char* word = new char[256];
             parse_word(word);
@@ -383,7 +383,7 @@
     {
         char* word = str;
         int counter = 0;
-        while (*reading_stream > 47 && *reading_stream < 58 || *reading_stream > 64 && *reading_stream < 91 || *reading_stream > 96 && *reading_stream < 123 || *reading_stream == 46)
+        while ((*reading_stream > 47 && *reading_stream < 58) || (*reading_stream > 64 && *reading_stream < 91) || (*reading_stream > 96 && *reading_stream < 123) || *reading_stream == 46)
         {
             *word++ = *reading_stream++;
             counter++;

Modified: branches/pch/src/util/SignalHandler.cc
===================================================================
--- branches/pch/src/util/SignalHandler.cc	2009-06-13 15:05:38 UTC (rev 3158)
+++ branches/pch/src/util/SignalHandler.cc	2009-06-13 16:41:05 UTC (rev 3159)
@@ -208,12 +208,12 @@
       while ( read( gdbOut[0], &byte, 1 ) == 1 )
       {
         if (
-          charsFound == 0 && byte == '(' ||
-          charsFound == 1 && byte == 'g' ||
-          charsFound == 2 && byte == 'd' ||
-          charsFound == 3 && byte == 'b' ||
-          charsFound == 4 && byte == ')' ||
-          charsFound == 5 && byte == ' '
+          (charsFound == 0 && byte == '(') ||
+          (charsFound == 1 && byte == 'g') ||
+          (charsFound == 2 && byte == 'd') ||
+          (charsFound == 3 && byte == 'b') ||
+          (charsFound == 4 && byte == ')') ||
+          (charsFound == 5 && byte == ' ')
             )
               charsFound++;
         else
@@ -245,12 +245,12 @@
         bt += std::string( &byte, 1 );
 
         if (
-          charsFound == 0 && byte == '(' ||
-          charsFound == 1 && byte == 'g' ||
-          charsFound == 2 && byte == 'd' ||
-          charsFound == 3 && byte == 'b' ||
-          charsFound == 4 && byte == ')' ||
-          charsFound == 5 && byte == ' '
+          (charsFound == 0 && byte == '(') ||
+          (charsFound == 1 && byte == 'g') ||
+          (charsFound == 2 && byte == 'd') ||
+          (charsFound == 3 && byte == 'b') ||
+          (charsFound == 4 && byte == ')') ||
+          (charsFound == 5 && byte == ' ')
             )
               charsFound++;
         else




More information about the Orxonox-commit mailing list