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/engine_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/engine_gui.cpp')
-rw-r--r-- | src/engine_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index a2f5b919c..8f4252f85 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -61,9 +61,9 @@ static const NWidgetPart _nested_engine_preview_widgets[] = { struct EnginePreviewWindow : Window { static const int VEHICLE_SPACE = 40; // The space to show the vehicle image - EnginePreviewWindow(const WindowDesc *desc, WindowNumber window_number) : Window() + EnginePreviewWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc) { - this->InitNested(desc, window_number); + this->InitNested(window_number); /* There is no way to recover the window; so disallow closure via DEL; unless SHIFT+DEL */ this->flags |= WF_STICKY; @@ -120,7 +120,7 @@ struct EnginePreviewWindow : Window { } }; -static const WindowDesc _engine_preview_desc( +static WindowDesc _engine_preview_desc( WDP_CENTER, 0, 0, WC_ENGINE_PREVIEW, WC_NONE, WDF_CONSTRUCTION, |