25 #include "table/strings.h"
39 GroupStatistics::~GroupStatistics()
69 assert(g->
owner == company);
74 if (IsDefaultGroupID(id_g))
return Company::Get(company)->group_default[type];
107 FOR_ALL_COMPANIES(c) {
128 FOR_ALL_COMPANIES(c) {
140 assert(delta == 1 || delta == -1);
163 assert(delta == 1 || delta == -1);
189 FOR_ALL_COMPANIES(c) {
224 if (g->
owner != company)
continue;
248 if (old_g != new_g) {
259 Group::Group(
Owner owner)
292 _new_group_id = g->
index;
337 FOR_ALL_ENGINE_RENEWS(er) {
354 static bool IsUniqueGroupNameForVehicleType(
const char *name,
VehicleType type)
434 default: NOT_REACHED();
479 if (ret.
Failed())
return ret;
481 new_g = _new_group_id;
704 void RemoveAllGroupsForCompany(
const CompanyID company)
709 if (company == g->
owner)
delete g;
725 if (search == group)
return true;