diff --git a/src/group_gui.cpp b/src/group_gui.cpp --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -76,7 +76,7 @@ static void ShowGroupActionDropdown(Wind list->push_back(new DropDownListStringItem(STR_SEND_FOR_SERVICING, GALF_SERVICE, false)); list->push_back(new DropDownListStringItem(STR_SEND_TRAIN_TO_DEPOT, GALF_DEPOT, false)); - if (IsValidGroupID(gid)) { + if (Group::IsValidID(gid)) { list->push_back(new DropDownListStringItem(STR_GROUP_ADD_SHARED_VEHICLE, GALF_ADD_SHARED, false)); list->push_back(new DropDownListStringItem(STR_GROUP_REMOVE_ALL_VEHICLES, GALF_REMOVE_ALL, false)); } @@ -321,7 +321,7 @@ public: this->groups.ForceResort(); } - if (!(IsAllGroupID(this->group_sel) || IsDefaultGroupID(this->group_sel) || IsValidGroupID(this->group_sel))) { + if (!(IsAllGroupID(this->group_sel) || IsDefaultGroupID(this->group_sel) || Group::IsValidID(this->group_sel))) { this->group_sel = ALL_GROUP; HideDropDownMenu(this); } @@ -567,7 +567,7 @@ public: } case GRP_WIDGET_RENAME_GROUP: { // Rename the selected roup - assert(IsValidGroupID(this->group_sel)); + assert(Group::IsValidID(this->group_sel)); const Group *g = Group::Get(this->group_sel); @@ -595,7 +595,7 @@ public: } case GRP_WIDGET_REPLACE_PROTECTION: - if (IsValidGroupID(this->group_sel)) { + if (Group::IsValidID(this->group_sel)) { const Group *g = Group::Get(this->group_sel); DoCommandP(0, this->group_sel, !g->replace_protection, CMD_SET_GROUP_REPLACE_PROTECTION); @@ -703,12 +703,12 @@ public: | DEPOT_MASS_SEND, GetCmdSendToDepot(this->vehicle_type)); break; case GALF_ADD_SHARED: // Add shared Vehicles - assert(IsValidGroupID(this->group_sel)); + assert(Group::IsValidID(this->group_sel)); DoCommandP(0, this->group_sel, this->vehicle_type, CMD_ADD_SHARED_VEHICLE_GROUP | CMD_MSG(STR_GROUP_CAN_T_ADD_SHARED_VEHICLE)); break; case GALF_REMOVE_ALL: // Remove all Vehicles from the selected group - assert(IsValidGroupID(this->group_sel)); + assert(Group::IsValidID(this->group_sel)); DoCommandP(0, this->group_sel, this->vehicle_type, CMD_REMOVE_ALL_VEHICLES_GROUP | CMD_MSG(STR_GROUP_CAN_T_REMOVE_ALL_VEHICLES)); break; @@ -758,7 +758,7 @@ static WindowDesc _group_desc( void ShowCompanyGroup(CompanyID company, VehicleType vehicle_type) { - if (!IsValidCompanyID(company)) return; + if (!Company::IsValidID(company)) return; _group_desc.cls = GetWindowClassForVehicleType(vehicle_type); WindowNumber num = (vehicle_type << 11) | VLW_GROUP_LIST | company;