Codechange: use parameter pack/folding instead of va_arg macros for widget states

This commit is contained in:
Rubidium
2023-09-16 21:56:09 +02:00
committed by rubidium42
parent 30eba33f1e
commit 8ab0936491
17 changed files with 58 additions and 88 deletions

View File

@@ -107,9 +107,7 @@ struct BuildAirToolbarWindow : Window {
if (!gui_scope) return;
bool can_build = CanBuildVehicleInfrastructure(VEH_AIRCRAFT);
this->SetWidgetsDisabledState(!can_build,
WID_AT_AIRPORT,
WIDGET_LIST_END);
this->SetWidgetDisabledState(WID_AT_AIRPORT, !can_build);
if (!can_build) {
CloseWindowById(WC_BUILD_STATION, TRANSPORT_AIR);