Codechange: Use correct type for linkgraph company mask.

This commit is contained in:
Peter Nelson
2023-04-07 10:12:29 +01:00
committed by PeterN
parent 65e0b0dcb7
commit 5199881a8d
4 changed files with 9 additions and 9 deletions

View File

@@ -444,7 +444,7 @@ void LinkGraphOverlay::SetCargoMask(CargoTypes cargo_mask)
* Set a new company mask and rebuild the cache.
* @param company_mask New company mask.
*/
void LinkGraphOverlay::SetCompanyMask(uint32 company_mask)
void LinkGraphOverlay::SetCompanyMask(CompanyMask company_mask)
{
this->company_mask = company_mask;
this->RebuildCache();
@@ -564,7 +564,7 @@ LinkGraphLegendWindow::LinkGraphLegendWindow(WindowDesc *desc, int window_number
*/
void LinkGraphLegendWindow::SetOverlay(std::shared_ptr<LinkGraphOverlay> overlay) {
this->overlay = overlay;
uint32 companies = this->overlay->GetCompanyMask();
CompanyMask companies = this->overlay->GetCompanyMask();
for (uint c = 0; c < MAX_COMPANIES; c++) {
if (!this->IsWidgetDisabled(WID_LGL_COMPANY_FIRST + c)) {
this->SetWidgetLoweredState(WID_LGL_COMPANY_FIRST + c, HasBit(companies, c));