diff options
author | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
commit | 56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b (patch) | |
tree | f3e5c225182fce7a451af4e09e943920e0f1cc3c /src/music_gui.cpp | |
parent | b10a4f151aa534860dcc61ecf8cba7b3589e6281 (diff) | |
download | openttd-56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b.tar.xz |
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
Diffstat (limited to 'src/music_gui.cpp')
-rw-r--r-- | src/music_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 72ed9f907..3f57da964 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -290,9 +290,9 @@ static void SelectPlaylist(byte list) } struct MusicTrackSelectionWindow : public Window { - MusicTrackSelectionWindow(const WindowDesc *desc, WindowNumber number) : Window() + MusicTrackSelectionWindow(WindowDesc *desc, WindowNumber number) : Window(desc) { - this->InitNested(desc, number); + this->InitNested(number); this->LowerWidget(WID_MTS_LIST_LEFT); this->LowerWidget(WID_MTS_LIST_RIGHT); this->SetWidgetDisabledState(WID_MTS_CLEAR, _settings_client.music.playlist <= 3); @@ -495,7 +495,7 @@ static const NWidgetPart _nested_music_track_selection_widgets[] = { EndContainer(), }; -static const WindowDesc _music_track_selection_desc( +static WindowDesc _music_track_selection_desc( WDP_AUTO, 0, 0, WC_MUSIC_TRACK_SELECTION, WC_NONE, 0, @@ -510,9 +510,9 @@ static void ShowMusicTrackSelection() struct MusicWindow : public Window { static const int slider_width = 3; - MusicWindow(const WindowDesc *desc, WindowNumber number) : Window() + MusicWindow(WindowDesc *desc, WindowNumber number) : Window(desc) { - this->InitNested(desc, number); + this->InitNested(number); this->LowerWidget(_settings_client.music.playlist + WID_M_ALL); this->SetWidgetLoweredState(WID_M_SHUFFLE, _settings_client.music.shuffle); } @@ -758,7 +758,7 @@ static const NWidgetPart _nested_music_window_widgets[] = { EndContainer(), }; -static const WindowDesc _music_window_desc( +static WindowDesc _music_window_desc( WDP_AUTO, 0, 0, WC_MUSIC_WINDOW, WC_NONE, 0, |