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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user