diff options
author | tron <tron@openttd.org> | 2006-02-01 06:32:03 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-02-01 06:32:03 +0000 |
commit | 22dc05faf2219f6e3803f9cbff92249823bb11eb (patch) | |
tree | 567a406e1224ab13f36027469339c6c42ada96f1 /vehicle_gui.c | |
parent | 8cdd3261fc5e37d2d39364d9c2c1449f83b1c504 (diff) | |
download | openttd-22dc05faf2219f6e3803f9cbff92249823bb11eb.tar.xz |
(svn r3510) Fiddle with whitespace and parentheses
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r-- | vehicle_gui.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c index 14a77130e..2b6eb2f65 100644 --- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -114,8 +114,9 @@ void BuildVehicleList(vehiclelist_d* vl, int type, PlayerID owner, StationID sta if (!(vl->flags & VL_REBUILD)) return; sort_list = malloc(GetVehiclePoolSize() * sizeof(sort_list[0])); - if (sort_list == NULL) + if (sort_list == NULL) { error("Could not allocate memory for the vehicle-sorting-list"); + } DEBUG(misc, 1) ("Building vehicle list for player %d station %d...", owner, station); @@ -124,8 +125,9 @@ void BuildVehicleList(vehiclelist_d* vl, int type, PlayerID owner, StationID sta const Vehicle *v; FOR_ALL_VEHICLES(v) { if (v->type == type && ( - (type == VEH_Train && IsFrontEngine(v)) || - (type != VEH_Train && v->subtype <= subtype))) { + (type == VEH_Train && IsFrontEngine(v)) || + (type != VEH_Train && v->subtype <= subtype) + )) { const Order *order; FOR_VEHICLE_ORDERS(v, order) { @@ -142,8 +144,9 @@ void BuildVehicleList(vehiclelist_d* vl, int type, PlayerID owner, StationID sta const Vehicle *v; FOR_ALL_VEHICLES(v) { if (v->type == type && v->owner == owner && ( - (type == VEH_Train && IsFrontEngine(v)) || - (type != VEH_Train && v->subtype <= subtype))) { + (type == VEH_Train && IsFrontEngine(v)) || + (type != VEH_Train && v->subtype <= subtype) + )) { sort_list[n].index = v->index; sort_list[n].owner = v->owner; ++n; @@ -153,8 +156,9 @@ void BuildVehicleList(vehiclelist_d* vl, int type, PlayerID owner, StationID sta free(vl->sort_list); vl->sort_list = malloc(n * sizeof(vl->sort_list[0])); - if (n != 0 && vl->sort_list == NULL) + if (n != 0 && vl->sort_list == NULL) { error("Could not allocate memory for the vehicle-sorting-list"); + } vl->list_length = n; for (i = 0; i < n; ++i) vl->sort_list[i] = sort_list[i]; |