Codechange: range based for loops instead of C-style for loops

This commit is contained in:
Rubidium
2024-04-09 17:18:35 +02:00
committed by rubidium42
parent 2587a21400
commit 4f2412a272
19 changed files with 65 additions and 66 deletions

View File

@@ -2380,8 +2380,8 @@ struct GameSettingsWindow : Window {
STR_CONFIG_SETTING_TYPE_COMPANY_MENU, STR_CONFIG_SETTING_TYPE_COMPANY_INGAME,
STR_CONFIG_SETTING_TYPE_GAME_MENU, STR_CONFIG_SETTING_TYPE_GAME_INGAME,
};
for (uint i = 0; i < lengthof(setting_types); i++) {
SetDParam(0, setting_types[i]);
for (const auto &setting_type : setting_types) {
SetDParam(0, setting_type);
size.width = std::max(size.width, GetStringBoundingBox(STR_CONFIG_SETTING_TYPE).width + padding.width);
}
size.height = 2 * GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_normal +