Codechange: Use a shared_ptr for viewport overlay. (#10586)

This commit is contained in:
PeterN
2023-03-31 16:06:36 +01:00
committed by GitHub
parent c905824248
commit c1077212d7
5 changed files with 7 additions and 10 deletions

View File

@@ -224,7 +224,7 @@ struct MainWindow : Window
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_M_VIEWPORT);
nvp->InitializeViewport(this, TileXY(32, 32), ScaleZoomGUI(ZOOM_LVL_VIEWPORT));
this->viewport->overlay = new LinkGraphOverlay(this, WID_M_VIEWPORT, 0, 0, 2);
this->viewport->overlay = std::make_shared<LinkGraphOverlay>(this, WID_M_VIEWPORT, 0, 0, 2);
this->refresh.SetInterval(LINKGRAPH_DELAY);
}