Codefix 37a03b5: the return value of maxdim should always be assigned (#12590)

This commit is contained in:
rubidium42 2024-04-28 19:42:58 +02:00 committed by GitHub
parent 98d37338df
commit fd4cf699e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -368,7 +368,7 @@ public:
case WID_RV_START_REPLACE: { case WID_RV_START_REPLACE: {
Dimension d = GetStringBoundingBox(STR_REPLACE_VEHICLES_START); 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.width += padding.width;
d.height += padding.height; d.height += padding.height;
size = maxdim(size, d); size = maxdim(size, d);

View File

@ -12,7 +12,7 @@
#include "geometry_type.hpp" #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. * Check if a rectangle is empty.

View File

@ -660,7 +660,7 @@ struct GenerateLandscapeWindow : public Window {
default: default:
return; return;
} }
maxdim(d, GetStringListBoundingBox(strs)); d = maxdim(d, GetStringListBoundingBox(strs));
d.width += padding.width; d.width += padding.width;
d.height += padding.height; d.height += padding.height;
size = maxdim(size, d); size = maxdim(size, d);