1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

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:
Richard Fine
2018-12-29 23:47:21 +00:00
parent a065806b20
commit b845304656

View File

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