Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPorteries Tristan <republicthunderbolt9@gmail.com>2015-12-30 15:27:30 +0300
committerPorteries Tristan <republicthunderbolt9@gmail.com>2015-12-30 15:47:43 +0300
commitf320724195e3ec045781d5331955be866c821b4f (patch)
treed2b1affb7006eb0b11ba02a70e3ef246616ff7e7
parent4145a4d08c0d2cede44af21f8fc4edc48cfc1051 (diff)
BGE: Fix invalid operator< for microsoft compiler.
It fixes the strict weak ordering assertion failure, see : https://support.microsoft.com/en-us/kb/949171. sybren and youle are the author of this commit.
-rw-r--r--source/gameengine/Ketsji/KX_TouchEventManager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_TouchEventManager.cpp b/source/gameengine/Ketsji/KX_TouchEventManager.cpp
index eb774960d41..7f167652464 100644
--- a/source/gameengine/Ketsji/KX_TouchEventManager.cpp
+++ b/source/gameengine/Ketsji/KX_TouchEventManager.cpp
@@ -235,5 +235,12 @@ KX_TouchEventManager::NewCollision::NewCollision(const NewCollision &to_copy)
bool KX_TouchEventManager::NewCollision::operator<(const NewCollision &other) const
{
- return first < other.first || second < other.second || colldata < other.colldata;
+ //see strict weak ordering: https://support.microsoft.com/en-us/kb/949171
+ if (first == other.first) {
+ if (second == other.second) {
+ return colldata < other.colldata;
+ }
+ return second < other.second;
+ }
+ return first < other.first;
}