summaryrefslogtreecommitdiff
path: root/src/vehicle_cmd.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2018-09-23 12:23:54 +0100
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commita690936ed75e96627be0e2ecafee2360a71e8d3c (patch)
tree1221c131b8fe3a51cf43a6bd7d89a51c431c559d /src/vehicle_cmd.cpp
parent56ae855dc20b27593c9a454d5a09d8f892a6c71f (diff)
downloadopenttd-a690936ed75e96627be0e2ecafee2360a71e8d3c.tar.xz
Codechange: Replace SmallVector::Length() with std::vector::size()
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r--src/vehicle_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index 27f2262e7..ccc9446a0 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -652,7 +652,7 @@ CommandCost CmdMassStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32
BuildDepotVehicleList(vli.vtype, tile, &list, NULL);
}
- for (uint i = 0; i < list.Length(); i++) {
+ for (uint i = 0; i < list.size(); i++) {
const Vehicle *v = list[i];
if (!!(v->vehstatus & VS_STOPPED) != do_start) continue;
@@ -691,7 +691,7 @@ CommandCost CmdDepotSellAllVehicles(TileIndex tile, DoCommandFlag flags, uint32
CommandCost last_error = CMD_ERROR;
bool had_success = false;
- for (uint i = 0; i < list.Length(); i++) {
+ for (uint i = 0; i < list.size(); i++) {
CommandCost ret = DoCommand(tile, list[i]->index | (1 << 20), 0, flags, sell_command);
if (ret.Succeeded()) {
cost.AddCost(ret);
@@ -725,7 +725,7 @@ CommandCost CmdDepotMassAutoReplace(TileIndex tile, DoCommandFlag flags, uint32
/* Get the list of vehicles in the depot */
BuildDepotVehicleList(vehicle_type, tile, &list, &list, true);
- for (uint i = 0; i < list.Length(); i++) {
+ for (uint i = 0; i < list.size(); i++) {
const Vehicle *v = list[i];
/* Ensure that the vehicle completely in the depot */
@@ -1003,7 +1003,7 @@ static CommandCost SendAllVehiclesToDepot(DoCommandFlag flags, bool service, con
/* Send all the vehicles to a depot */
bool had_success = false;
- for (uint i = 0; i < list.Length(); i++) {
+ for (uint i = 0; i < list.size(); i++) {
const Vehicle *v = list[i];
CommandCost ret = DoCommand(v->tile, v->index | (service ? DEPOT_SERVICE : 0U) | DEPOT_DONT_CANCEL, 0, flags, GetCmdSendToDepot(vli.vtype));