(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.

This commit is contained in:
frosch
2013-05-26 19:23:42 +00:00
parent b10a4f151a
commit 56e4a8c4d6
61 changed files with 488 additions and 482 deletions

View File

@@ -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,