Codechange: Reorganise hotkey initialisation. (#10951)

Hotkeys are now initialized inline, and use std::vector instead of
separate static C-arrays and std::string instead of char *. The list end
marker is no longer required.
This commit is contained in:
2023-06-05 18:12:30 +01:00
committed by GitHub
parent 921f5afc4d
commit f814c86389
15 changed files with 410 additions and 502 deletions

View File

@@ -1871,15 +1871,11 @@ struct BuildVehicleWindow : Window {
return ES_HANDLED;
}
static HotkeyList hotkeys;
static inline HotkeyList hotkeys{"buildvehicle", {
Hotkey('F', "focus_filter_box", BVHK_FOCUS_FILTER_BOX),
}};
};
static Hotkey buildvehicle_hotkeys[] = {
Hotkey('F', "focus_filter_box", BVHK_FOCUS_FILTER_BOX),
HOTKEY_LIST_END
};
HotkeyList BuildVehicleWindow::hotkeys("buildvehicle", buildvehicle_hotkeys);
static WindowDesc _build_vehicle_desc(
WDP_AUTO, "build_vehicle", 240, 268,
WC_BUILD_VEHICLE, WC_NONE,