Codechange: Pass by reference to UpdateWidgetSize. (#12457)

These parameters are always provided and not optional.
This commit is contained in:
Peter Nelson
2024-04-09 08:34:45 +01:00
committed by GitHub
parent b5ad28022d
commit de4e00c93f
55 changed files with 602 additions and 602 deletions

View File

@@ -136,19 +136,19 @@ struct GSConfigWindow : public Window {
this->vscroll->SetCount(this->visible_settings.size());
}
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
{
switch (widget) {
case WID_GSC_SETTINGS:
this->line_height = std::max(SETTING_BUTTON_HEIGHT, GetCharacterHeight(FS_NORMAL)) + padding.height;
resize->width = 1;
resize->height = this->line_height;
size->height = 5 * this->line_height;
resize.width = 1;
resize.height = this->line_height;
size.height = 5 * this->line_height;
break;
case WID_GSC_GSLIST:
this->line_height = GetCharacterHeight(FS_NORMAL) + padding.height;
size->height = 1 * this->line_height;
size.height = 1 * this->line_height;
break;
}
}