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

@@ -562,7 +562,7 @@ LinkGraphLegendWindow::LinkGraphLegendWindow(WindowDesc *desc, int window_number
* Set the overlay belonging to this menu and import its company/cargo settings.
* @param overlay New overlay for this menu.
*/
void LinkGraphLegendWindow::SetOverlay(LinkGraphOverlay *overlay) {
void LinkGraphLegendWindow::SetOverlay(std::shared_ptr<LinkGraphOverlay> overlay) {
this->overlay = overlay;
uint32 companies = this->overlay->GetCompanyMask();
for (uint c = 0; c < MAX_COMPANIES; c++) {