Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loops

This commit is contained in:
glx22
2020-12-27 00:13:56 +01:00
committed by Charles Pigott
parent 1478fa93b3
commit d8605ad18d
11 changed files with 69 additions and 48 deletions

View File

@@ -179,9 +179,8 @@ static bool VerifyAutoreplaceRefitForOrders(const Vehicle *v, EngineID engine_ty
CargoTypes union_refit_mask_a = GetUnionOfArticulatedRefitMasks(v->engine_type, false);
CargoTypes union_refit_mask_b = GetUnionOfArticulatedRefitMasks(engine_type, false);
const Order *o;
const Vehicle *u = (v->type == VEH_TRAIN) ? v->First() : v;
FOR_VEHICLE_ORDERS(u, o) {
for (const Order *o : u->Orders()) {
if (!o->IsRefit() || o->IsAutoRefit()) continue;
CargoID cargo_type = o->GetRefitCargo();