From 615df6203db0177ab6e17aab2cbc9d1c35ad6398 Mon Sep 17 00:00:00 2001 From: Dydzio Date: Thu, 26 Jul 2018 16:43:40 +0200 Subject: [PATCH] Oprator overload correction... --- lib/mapObjects/CObjectClassesHandler.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/mapObjects/CObjectClassesHandler.h b/lib/mapObjects/CObjectClassesHandler.h index 82fa44cdb..d23fdb033 100644 --- a/lib/mapObjects/CObjectClassesHandler.h +++ b/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); } };