mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
Codechange: Dimension must have both width and height.
Default parameters allowed Dimension to be constructed with only a width. Instead use separate empty and width/height constructors to ensure that either none or both are provided.
This commit is contained in:
parent
0b1429ce14
commit
62e4d1e507
@ -28,7 +28,8 @@ struct Dimension {
|
|||||||
uint width;
|
uint width;
|
||||||
uint height;
|
uint height;
|
||||||
|
|
||||||
Dimension(uint w = 0, uint h = 0) : width(w), height(h) {};
|
constexpr Dimension() : width(0), height(0) {}
|
||||||
|
constexpr Dimension(uint w, uint h) : width(w), height(h) {}
|
||||||
|
|
||||||
bool operator< (const Dimension &other) const
|
bool operator< (const Dimension &other) const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user