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/linkgraph/linkgraph_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/linkgraph/linkgraph_gui.cpp')
-rw-r--r-- | src/linkgraph/linkgraph_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/linkgraph/linkgraph_gui.cpp b/src/linkgraph/linkgraph_gui.cpp index 736b5733e..1fd852c5e 100644 --- a/src/linkgraph/linkgraph_gui.cpp +++ b/src/linkgraph/linkgraph_gui.cpp @@ -380,7 +380,7 @@ static const NWidgetPart _nested_linkgraph_legend_widgets[] = { assert_compile(WID_LGL_SATURATION_LAST - WID_LGL_SATURATION_FIRST == lengthof(LinkGraphOverlay::LINK_COLOURS) - 1); -static const WindowDesc _linkgraph_legend_desc( +static WindowDesc _linkgraph_legend_desc( WDP_MANUAL, 300, 314, WC_LINKGRAPH_LEGEND, WC_NONE, 0, @@ -395,9 +395,9 @@ void ShowLinkGraphLegend() AllocateWindowDescFront<LinkGraphLegendWindow>(&_linkgraph_legend_desc, 0); } -LinkGraphLegendWindow::LinkGraphLegendWindow(const WindowDesc *desc, int window_number) +LinkGraphLegendWindow::LinkGraphLegendWindow(WindowDesc *desc, int window_number) : Window(desc) { - this->InitNested(desc, window_number); + this->InitNested(window_number); this->InvalidateData(0); this->SetOverlay(FindWindowById(WC_MAIN_WINDOW, 0)->viewport->overlay); } |