diff options
author | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-12-30 15:27:30 +0300 |
---|---|---|
committer | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-12-30 15:47:43 +0300 |
commit | f320724195e3ec045781d5331955be866c821b4f (patch) | |
tree | d2b1affb7006eb0b11ba02a70e3ef246616ff7e7 /source/gameengine | |
parent | 4145a4d08c0d2cede44af21f8fc4edc48cfc1051 (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.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Ketsji/KX_TouchEventManager.cpp | 9 |
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; } |