summaryrefslogtreecommitdiff
path: root/src/linkgraph
diff options
context:
space:
mode:
Diffstat (limited to 'src/linkgraph')
-rw-r--r--src/linkgraph/linkgraph_gui.cpp6
-rw-r--r--src/linkgraph/linkgraph_gui.h2
2 files changed, 4 insertions, 4 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);
}
diff --git a/src/linkgraph/linkgraph_gui.h b/src/linkgraph/linkgraph_gui.h
index c65e9a409..fe87a0464 100644
--- a/src/linkgraph/linkgraph_gui.h
+++ b/src/linkgraph/linkgraph_gui.h
@@ -96,7 +96,7 @@ void ShowLinkGraphLegend();
*/
struct LinkGraphLegendWindow : Window {
public:
- LinkGraphLegendWindow(const WindowDesc *desc, int window_number);
+ LinkGraphLegendWindow(WindowDesc *desc, int window_number);
void SetOverlay(LinkGraphOverlay *overlay);
virtual void DrawWidget(const Rect &r, int widget) const;