mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Oprator overload correction...
This commit is contained in:
parent
13cca972d6
commit
615df6203d
@ -74,15 +74,15 @@ struct DLL_LINKAGE CompoundMapObjectID
|
|||||||
|
|
||||||
bool operator<(const CompoundMapObjectID& other) const
|
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
|
bool operator==(const CompoundMapObjectID& other) const
|
||||||
{
|
{
|
||||||
if(this->primaryID == other.primaryID)
|
return (this->primaryID == other.primaryID) && (this->secondaryID == other.secondaryID);
|
||||||
return this->secondaryID == other.secondaryID;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user