mirror of https://github.com/OpenRCT2/OpenRCT2.git
Equality operators for TileCoordsXYZ
Introduce operator == and operator != for TileCoordsXYZ, so that we can more easily operate on them in tests.
This commit is contained in:
parent
a065806b20
commit
b845304656
|
@ -116,6 +116,16 @@ struct TileCoordsXYZ
|
|||
y += rhs.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(const TileCoordsXYZ& other) const
|
||||
{
|
||||
return x == other.x && y == other.y && z == other.z;
|
||||
}
|
||||
bool operator!=(const TileCoordsXYZ& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
int32_t x = 0, y = 0, z = 0;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue