Codechange: use EnumBitSet for CargoTypes

This commit is contained in:
Peter Nelson
2026-04-21 17:13:31 +01:00
committed by Peter Nelson
parent 962a550d1b
commit c45aa3c9b6
55 changed files with 278 additions and 265 deletions
+2 -2
View File
@@ -221,14 +221,14 @@ struct MainWindow : Window
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_M_VIEWPORT);
nvp->InitializeViewport(this, TileXY(32, 32), ScaleZoomGUI(ZoomLevel::Viewport));
this->viewport->overlay = std::make_shared<LinkGraphOverlay>(this, WID_M_VIEWPORT, 0, CompanyMask{}, 2);
this->viewport->overlay = std::make_shared<LinkGraphOverlay>(this, WID_M_VIEWPORT, CargoTypes{}, CompanyMask{}, 2);
this->refresh_timeout.Reset();
}
/** Refresh the link-graph overlay. */
void RefreshLinkGraph()
{
if (this->viewport->overlay->GetCargoMask() == 0 ||
if (this->viewport->overlay->GetCargoMask().None() ||
this->viewport->overlay->GetCompanyMask().None()) {
return;
}