[Orxonox-commit 2811] r7514 - in code/branches/ois_update/src: . libraries/core/command libraries/util
rgrieder at orxonox.net
rgrieder at orxonox.net
Sat Oct 9 15:36:52 CEST 2010
Author: rgrieder
Date: 2010-10-09 15:36:51 +0200 (Sat, 09 Oct 2010)
New Revision: 7514
Modified:
code/branches/ois_update/src/OrxonoxConfig.cmake
code/branches/ois_update/src/OrxonoxConfig.h.in
code/branches/ois_update/src/libraries/core/command/Functor.h
code/branches/ois_update/src/libraries/util/SharedPtr.h
Log:
This hopefully fixes some warnings with gcc 4.0.
Modified: code/branches/ois_update/src/OrxonoxConfig.cmake
===================================================================
--- code/branches/ois_update/src/OrxonoxConfig.cmake 2010-10-08 22:27:50 UTC (rev 7513)
+++ code/branches/ois_update/src/OrxonoxConfig.cmake 2010-10-09 13:36:51 UTC (rev 7514)
@@ -74,6 +74,13 @@
CHECK_CXX_SOURCE_COMPILES("${_source}" HAVE_FORCEINLINE)
ENDIF(MSVC)
+# Part of a woraround for OS X warnings. See OrxonoxConfig.h.in
+IF(HAVE_STDINT_H)
+ SET(HAVE_STDINT_H 1)
+ELSE()
+ SET(HAVE_STDINT_H 0)
+ENDIF()
+
# Check iso646.h include (literal operators)
INCLUDE(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX(iso646.h HAVE_ISO646_H)
Modified: code/branches/ois_update/src/OrxonoxConfig.h.in
===================================================================
--- code/branches/ois_update/src/OrxonoxConfig.h.in 2010-10-08 22:27:50 UTC (rev 7513)
+++ code/branches/ois_update/src/OrxonoxConfig.h.in 2010-10-09 13:36:51 UTC (rev 7514)
@@ -157,8 +157,10 @@
# include <iso646.h>
#endif
-#cmakedefine HAVE_STDINT_H
-#ifdef HAVE_STDINT_H
+// On OS X some headers already define HAVE_STDINT_H and that spits out
+// some warnings. Therefore we use this syntax.
+// Note: This requires some extra code in OrxonoxConfig.cmake
+#if @HAVE_STDINT_H@
# include <stdint.h>
#elif defined(ORXONOX_COMPILER_MSVC)
typedef __int8 int8_t;
Modified: code/branches/ois_update/src/libraries/core/command/Functor.h
===================================================================
--- code/branches/ois_update/src/libraries/core/command/Functor.h 2010-10-08 22:27:50 UTC (rev 7513)
+++ code/branches/ois_update/src/libraries/core/command/Functor.h 2010-10-09 13:36:51 UTC (rev 7514)
@@ -185,6 +185,8 @@
};
public:
+ virtual ~Functor() {}
+
/// Calls the function-pointer with up to five arguments. In case of a member-function, the assigned object-pointer is used to call the function. @return Returns the return-value of the function (if any; MT_Type::Null otherwise)
virtual MultiType operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
@@ -247,6 +249,7 @@
public:
/// Constructor: Stores the object-pointer.
FunctorMember(O* object = 0) : object_(object) {}
+ virtual ~FunctorMember() {}
/// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be NULL. @return Returns the return-value of the function (if any; MT_Type::Null otherwise)
virtual MultiType operator()(O* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
Modified: code/branches/ois_update/src/libraries/util/SharedPtr.h
===================================================================
--- code/branches/ois_update/src/libraries/util/SharedPtr.h 2010-10-08 22:27:50 UTC (rev 7513)
+++ code/branches/ois_update/src/libraries/util/SharedPtr.h 2010-10-09 13:36:51 UTC (rev 7514)
@@ -162,6 +162,7 @@
{
public:
SharedCounter() : count_(1) {}
+ virtual ~SharedCounter() {}
virtual void destroy() = 0;
int count_;
More information about the Orxonox-commit
mailing list