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.
This commit is contained in:
Porteries Tristan 2015-12-30 13:27:30 +01:00
parent 4145a4d08c
commit f320724195
1 changed files with 8 additions and 1 deletions

View File

@ -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;
}