Codechange: Pass by reference to UpdateWidgetSize. (#12457)
These parameters are always provided and not optional.
This commit is contained in:
@@ -131,17 +131,17 @@ struct SubsidyListWindow : Window {
|
||||
return 3 + num_awarded + num_not_awarded;
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(WidgetID widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
|
||||
{
|
||||
if (widget != WID_SUL_PANEL) return;
|
||||
Dimension d = maxdim(GetStringBoundingBox(STR_SUBSIDIES_OFFERED_TITLE), GetStringBoundingBox(STR_SUBSIDIES_SUBSIDISED_TITLE));
|
||||
|
||||
resize->height = GetCharacterHeight(FS_NORMAL);
|
||||
resize.height = GetCharacterHeight(FS_NORMAL);
|
||||
|
||||
d.height *= 5;
|
||||
d.width += WidgetDimensions::scaled.framerect.Horizontal();
|
||||
d.height += WidgetDimensions::scaled.framerect.Vertical();
|
||||
*size = maxdim(*size, d);
|
||||
size = maxdim(size, d);
|
||||
}
|
||||
|
||||
void DrawCargoIcon(const Rect &r, int y_offset, CargoID cid) const
|
||||
|
Reference in New Issue
Block a user