[Orxonox-commit 2861] r7564 - in code/branches/ois_update/src: external/bullet/BulletCollision/NarrowPhaseCollision libraries/core modules/questsystem modules/questsystem/effects
rgrieder at orxonox.net
rgrieder at orxonox.net
Tue Oct 19 23:43:25 CEST 2010
Author: rgrieder
Date: 2010-10-19 23:43:25 +0200 (Tue, 19 Oct 2010)
New Revision: 7564
Modified:
code/branches/ois_update/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
code/branches/ois_update/src/libraries/core/Super.h
code/branches/ois_update/src/modules/questsystem/QuestEffect.cc
code/branches/ois_update/src/modules/questsystem/QuestEffectBeacon.cc
code/branches/ois_update/src/modules/questsystem/effects/AddReward.cc
Log:
Renamed all symbols called "check" because of macro collisions on OS X.
Inserted something like an assert in btGjkPairDetector.cpp with the hope that I don't have to modify that 'check' there.
Modified: code/branches/ois_update/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
===================================================================
--- code/branches/ois_update/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp 2010-10-19 21:32:36 UTC (rev 7563)
+++ code/branches/ois_update/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp 2010-10-19 21:43:25 UTC (rev 7564)
@@ -37,6 +37,12 @@
int gNumDeepPenetrationChecks = 0;
int gNumGjkChecks = 0;
+#ifdef check
+struct CompilerError
+{
+ void CompilerError() {}
+};
+#endif
btGjkPairDetector::btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver)
Modified: code/branches/ois_update/src/libraries/core/Super.h
===================================================================
--- code/branches/ois_update/src/libraries/core/Super.h 2010-10-19 21:32:36 UTC (rev 7563)
+++ code/branches/ois_update/src/libraries/core/Super.h 2010-10-19 21:43:25 UTC (rev 7564)
@@ -93,10 +93,10 @@
template <class T, int templatehack2> \
struct SuperFunctionCondition<functionnumber, T, 0, templatehack2> \
{ \
- static void check() \
+ static void verify() \
{ \
SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0)); \
- SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::check(); \
+ SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::verify(); \
} \
\
static void apply(void* temp) {} \
@@ -131,9 +131,9 @@
template <int templatehack2> \
struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
{ \
- static void check() \
+ static void verify() \
{ \
- SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::check(); \
+ SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::verify(); \
} \
};
@@ -149,14 +149,14 @@
template <class T, templatehack2>
struct SuperFunctionCondition<functionnumber, T, 0, templatehack2>
{
- static void check()
+ static void verify()
{
// This call to the apply-function is the whole check. By calling the function with
// a T* pointer, the right function get's called.
SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0));
- // Go go the check for of next super-function (functionnumber + 1)
- SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::check();
+ // Go go the verify for of next super-function (functionnumber + 1)
+ SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::verify();
}
// This function gets called if T is not a child of the baseclass.
@@ -201,10 +201,10 @@
template <int templatehack2> \
struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
{ \
- // The check function acts like the fallback - it advances to the check for the next super-function (functionnumber + 1)
- static void check() \
+ // The verify function acts like the fallback - it advances to the check for the next super-function (functionnumber + 1)
+ static void verify() \
{ \
- SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::check(); \
+ SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::verify(); \
} \
};
*/
@@ -302,7 +302,7 @@
template <int functionnumber, class T, int templatehack1, int templatehack2>
struct SuperFunctionCondition
{
- static void check() {}
+ static void verify() {}
};
/**
@@ -337,9 +337,9 @@
template <class T, int templatehack1, int templatehack2> \
struct SuperFunctionCondition<functionnumber, T, templatehack1, templatehack2> \
{ \
- static void check() \
+ static void verify() \
{ \
- SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::check(); \
+ SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::verify(); \
} \
}; \
\
@@ -420,10 +420,10 @@
{
// If this function gets called, the header-file of the super function is not
// included, so this fallback template (templatehack not specialized) is used
- static void check()
+ static void verify()
{
// Calls the condition-check of the next super-function (functionnumber + 1)
- SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::check();
+ SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::verify();
}
};
@@ -573,7 +573,7 @@
// This get's called within the initialization of an Identifier
virtual void createSuperFunctionCaller() const
{
- //SuperFunctionCondition<0, T, 0, 0>::check();
+ //SuperFunctionCondition<0, T, 0, 0>::verify();
}
Modified: code/branches/ois_update/src/modules/questsystem/QuestEffect.cc
===================================================================
--- code/branches/ois_update/src/modules/questsystem/QuestEffect.cc 2010-10-19 21:32:36 UTC (rev 7563)
+++ code/branches/ois_update/src/modules/questsystem/QuestEffect.cc 2010-10-19 21:43:25 UTC (rev 7564)
@@ -67,14 +67,14 @@
*/
/*static*/ bool QuestEffect::invokeEffects(PlayerInfo* player, std::list<QuestEffect*> & effects)
{
- bool check = true;
+ bool temp = true;
COUT(4) << "Invoking QuestEffects on player: " << player << " ." << std::endl;
for (std::list<QuestEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
- check = check && (*effect)->invoke(player);
+ temp = temp && (*effect)->invoke(player);
- return check;
+ return temp;
}
}
Modified: code/branches/ois_update/src/modules/questsystem/QuestEffectBeacon.cc
===================================================================
--- code/branches/ois_update/src/modules/questsystem/QuestEffectBeacon.cc 2010-10-19 21:32:36 UTC (rev 7563)
+++ code/branches/ois_update/src/modules/questsystem/QuestEffectBeacon.cc 2010-10-19 21:43:25 UTC (rev 7564)
@@ -153,8 +153,8 @@
COUT(4) << "QuestEffectBeacon executed on player: " << player << " ." << std::endl;
- bool check = QuestEffect::invokeEffects(player, this->effects_); // Invoke the QuestEffects on the PlayerInfo.
- if(check)
+ bool temp = QuestEffect::invokeEffects(player, this->effects_); // Invoke the QuestEffects on the PlayerInfo.
+ if(temp)
{
this->decrementTimes(); // Decrement the number of times the beacon can be used.
return true;
Modified: code/branches/ois_update/src/modules/questsystem/effects/AddReward.cc
===================================================================
--- code/branches/ois_update/src/modules/questsystem/effects/AddReward.cc 2010-10-19 21:32:36 UTC (rev 7563)
+++ code/branches/ois_update/src/modules/questsystem/effects/AddReward.cc 2010-10-19 21:43:25 UTC (rev 7564)
@@ -104,13 +104,13 @@
{
COUT(5) << "AddReward on player: " << player << " ." << std::endl;
- bool check = true;
+ bool temp = true;
for ( std::list<Rewardable*>::iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward )
- check = check && (*reward)->reward(player);
+ temp = temp && (*reward)->reward(player);
COUT(4) << "Rewardable successfully added to player." << player << " ." << std::endl;
- return check;
+ return temp;
}
}
More information about the Orxonox-commit
mailing list