Skip to content

Commit

Permalink
Codechange: Use CompanyMask to pass Companies to PopupMainCompanyTool…
Browse files Browse the repository at this point in the history
…bMenu().

It's like the type was designed for it.
  • Loading branch information
PeterN committed Jan 5, 2024
1 parent 6828b60 commit 06a5fa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/toolbar_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ static const int CTMN_SPECTATOR = -3; ///< Show a company window as spectator
* Pop up a generic company list menu.
* @param w The toolbar window.
* @param widget The button widget id.
* @param grey A bitbask of which items to mark as disabled.
* @param grey A bitmask of which companies to mark as disabled.
*/
static void PopupMainCompanyToolbMenu(Window *w, WidgetID widget, int grey = 0)
static void PopupMainCompanyToolbMenu(Window *w, WidgetID widget, CompanyMask grey = 0)
{
DropDownList list;

Expand Down Expand Up @@ -728,7 +728,7 @@ static CallBackFunction MenuClickIndustry(int index)

static void ToolbarVehicleClick(Window *w, VehicleType veh)
{
int dis = 0;
CompanyMask dis = 0;

for (const Company *c : Company::Iterate()) {
if (c->group_all[veh].num_vehicle == 0) SetBit(dis, c->index);
Expand Down

0 comments on commit 06a5fa6

Please sign in to comment.