forked from mirror/OpenTTD
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user