diff options
author | frosch <frosch@openttd.org> | 2013-06-15 15:27:33 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-06-15 15:27:33 +0000 |
commit | d9e9710cb3c4273d3742d0097dbe0b78511a5511 (patch) | |
tree | a107a3a43bbd18fb929a32c3298c75bba31ce7b8 /src/airport_gui.cpp | |
parent | cd0a57fba30a7d365ab84af9846860c64da6b242 (diff) | |
download | openttd-d9e9710cb3c4273d3742d0097dbe0b78511a5511.tar.xz |
(svn r25408) -Codechange: Simplify hotkeys by removing unused stuff.
Diffstat (limited to 'src/airport_gui.cpp')
-rw-r--r-- | src/airport_gui.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index dc862fe26..564941d24 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -102,7 +102,7 @@ struct BuildAirToolbarWindow : Window { virtual EventState OnKeyPress(uint16 key, uint16 keycode) { - int num = CheckHotkeyMatch(airtoolbar_hotkeys, keycode, this); + int num = CheckHotkeyMatch(airtoolbar_hotkeys, keycode); if (num == -1) return ES_NOT_HANDLED; this->OnClick(Point(), num, 1); return ES_HANDLED; @@ -143,15 +143,15 @@ struct BuildAirToolbarWindow : Window { DeleteWindowById(WC_SELECT_STATION, 0); } - static Hotkey<BuildAirToolbarWindow> airtoolbar_hotkeys[]; + static Hotkey airtoolbar_hotkeys[]; }; -Hotkey<BuildAirToolbarWindow> BuildAirToolbarWindow::airtoolbar_hotkeys[] = { - Hotkey<BuildAirToolbarWindow>('1', "airport", WID_AT_AIRPORT), - Hotkey<BuildAirToolbarWindow>('2', "demolish", WID_AT_DEMOLISH), - HOTKEY_LIST_END(BuildAirToolbarWindow) +Hotkey BuildAirToolbarWindow::airtoolbar_hotkeys[] = { + Hotkey('1', "airport", WID_AT_AIRPORT), + Hotkey('2', "demolish", WID_AT_DEMOLISH), + HOTKEY_LIST_END }; -Hotkey<BuildAirToolbarWindow> *_airtoolbar_hotkeys = BuildAirToolbarWindow::airtoolbar_hotkeys; +Hotkey *_airtoolbar_hotkeys = BuildAirToolbarWindow::airtoolbar_hotkeys; static const NWidgetPart _nested_air_toolbar_widgets[] = { NWidget(NWID_HORIZONTAL), @@ -191,7 +191,7 @@ Window *ShowBuildAirToolbar() EventState AirportToolbarGlobalHotkeys(uint16 key, uint16 keycode) { if (!CanBuildVehicleInfrastructure(VEH_AIRCRAFT)) return ES_NOT_HANDLED; - int num = CheckHotkeyMatch<BuildAirToolbarWindow>(_airtoolbar_hotkeys, keycode, NULL, true); + int num = CheckHotkeyMatch(_airtoolbar_hotkeys, keycode, true); if (num == -1) return ES_NOT_HANDLED; Window *w = ShowBuildAirToolbar(); if (w == NULL) return ES_NOT_HANDLED; |