1
0
Fork 0

Fix 37a03b5: the return value of maxdim should always be assigned

pull/12590/head
Rubidium 2024-04-28 19:06:29 +02:00
parent d183d8e587
commit 3babfc1a37
3 changed files with 3 additions and 3 deletions

View File

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

View File

@ -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.

View File

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