Browse Source

Oprator overload correction...

Dydzio 7 years ago
parent
commit
615df6203d
1 changed files with 5 additions and 5 deletions
  1. 5 5
      lib/mapObjects/CObjectClassesHandler.h

+ 5 - 5
lib/mapObjects/CObjectClassesHandler.h

@@ -74,15 +74,15 @@ struct DLL_LINKAGE CompoundMapObjectID
 
 	bool operator<(const CompoundMapObjectID& other) const
 	{
-		return (this->primaryID == other.primaryID) && (this->secondaryID == other.secondaryID);
+		if(this->primaryID != other.primaryID)
+			return this->primaryID < other.primaryID;
+		else
+			return this->secondaryID < other.secondaryID;
 	}
 
 	bool operator==(const CompoundMapObjectID& other) const
 	{
-		if(this->primaryID == other.primaryID)
-			return this->secondaryID == other.secondaryID;
-
-		return false;
+		return (this->primaryID == other.primaryID) && (this->secondaryID == other.secondaryID);
 	}
 };