mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-28 17:09:10 +00:00
Fix 37a03b5
: the return value of maxdim should always be assigned
This commit is contained in:
@@ -368,7 +368,7 @@ public:
|
||||
|
||||
case WID_RV_START_REPLACE: {
|
||||
Dimension d = GetStringBoundingBox(STR_REPLACE_VEHICLES_START);
|
||||
maxdim(d, GetStringListBoundingBox(_start_replace_dropdown));
|
||||
d = maxdim(d, GetStringListBoundingBox(_start_replace_dropdown));
|
||||
d.width += padding.width;
|
||||
d.height += padding.height;
|
||||
size = maxdim(size, d);
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "geometry_type.hpp"
|
||||
|
||||
Dimension maxdim(const Dimension &d1, const Dimension &d2);
|
||||
[[nodiscard]] Dimension maxdim(const Dimension &d1, const Dimension &d2);
|
||||
|
||||
/**
|
||||
* Check if a rectangle is empty.
|
||||
|
@@ -660,7 +660,7 @@ struct GenerateLandscapeWindow : public Window {
|
||||
default:
|
||||
return;
|
||||
}
|
||||
maxdim(d, GetStringListBoundingBox(strs));
|
||||
d = maxdim(d, GetStringListBoundingBox(strs));
|
||||
d.width += padding.width;
|
||||
d.height += padding.height;
|
||||
size = maxdim(size, d);
|
||||
|
Reference in New Issue
Block a user