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:
@@ -3264,15 +3264,11 @@ public:
|
||||
::ShowNewGRFInspectWindow(GetGrfSpecFeature(Vehicle::Get(this->window_number)->type), this->window_number);
|
||||
}
|
||||
|
||||
static HotkeyList hotkeys;
|
||||
static inline HotkeyList hotkeys{"vehicleview", {
|
||||
Hotkey('H', "honk", WID_VV_HONK_HORN),
|
||||
}};
|
||||
};
|
||||
|
||||
static Hotkey vehicleview_hotkeys[] = {
|
||||
Hotkey('H', "honk", WID_VV_HONK_HORN),
|
||||
HOTKEY_LIST_END
|
||||
};
|
||||
HotkeyList VehicleViewWindow::hotkeys("vehicleview", vehicleview_hotkeys);
|
||||
|
||||
/** Vehicle view window descriptor for all vehicles but trains. */
|
||||
static WindowDesc _vehicle_view_desc(
|
||||
WDP_AUTO, "view_vehicle", 250, 116,
|
||||
|
Reference in New Issue
Block a user