(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

@@ -1045,11 +1045,11 @@ void SmallMapWindow::SetupWidgetData()
this->GetWidget<NWidgetStacked>(WID_SM_SELECT_BUTTONS)->SetDisplayedPlane(plane);
}
SmallMapWindow::SmallMapWindow(const WindowDesc *desc, int window_number) : Window(), refresh(FORCE_REFRESH_PERIOD)
SmallMapWindow::SmallMapWindow(WindowDesc *desc, int window_number) : Window(desc), refresh(FORCE_REFRESH_PERIOD)
{
_smallmap_industry_highlight = INVALID_INDUSTRYTYPE;
this->overlay = new LinkGraphOverlay(this, WID_SM_MAP);
this->InitNested(desc, window_number);
this->InitNested(window_number);
this->LowerWidget(this->map_type + WID_SM_CONTOUR);
BuildLandLegend();
@@ -1776,7 +1776,7 @@ static const NWidgetPart _nested_smallmap_widgets[] = {
EndContainer(),
};
static const WindowDesc _smallmap_desc(
static WindowDesc _smallmap_desc(
WDP_AUTO, 484, 314,
WC_SMALLMAP, WC_NONE,
0,