summaryrefslogtreecommitdiff
path: root/src/group_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-17 01:00:56 +0000
committersmatz <smatz@openttd.org>2009-05-17 01:00:56 +0000
commit871107f52952ee59c353feab933126ed206e60bf (patch)
tree482884dfedc1700bddb8812f1de755212ed8bb22 /src/group_gui.cpp
parented1e54bd84074412ea9f273b7cd86aed42d844ce (diff)
downloadopenttd-871107f52952ee59c353feab933126ed206e60bf.tar.xz
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r--src/group_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index cf6ece60c..ca49ff3e5 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -76,7 +76,7 @@ static void ShowGroupActionDropdown(Window *w, GroupID gid)
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;