summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-11-30 23:21:16 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit41fa16f3254ffa9f44b85d6570a2293e8438b427 (patch)
treea508634b7dea7a0937e92c143db0a392cd99a4b0 /src/vehicle.cpp
parent57b82e2e99aa30a649d1fd80f192ccf5338dc7c4 (diff)
downloadopenttd-41fa16f3254ffa9f44b85d6570a2293e8438b427.tar.xz
Codechange: Don't use globals for return values from vehicle command procs.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 3bbca46f0..11b409594 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -85,10 +85,6 @@ static const int GEN_HASHY_INC = 1 << GEN_HASHX_BITS;
static const uint GEN_HASHX_MASK = (1 << GEN_HASHX_BITS) - 1;
static const uint GEN_HASHY_MASK = ((1 << GEN_HASHY_BITS) - 1) << GEN_HASHX_BITS;
-VehicleID _new_vehicle_id;
-uint _returned_refit_capacity; ///< Stores the capacity after a refit operation.
-uint16 _returned_mail_refit_capacity; ///< Stores the mail capacity after a refit operation (Aircraft only).
-
/** The pool with all our precious vehicles. */
VehiclePool _vehicle_pool("Vehicle");
@@ -1565,7 +1561,7 @@ void VehicleEnterDepot(Vehicle *v)
if (v->current_order.IsRefit()) {
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
- CommandCost cost = Command<CMD_REFIT_VEHICLE>::Do(DC_EXEC, v->index, v->current_order.GetRefitCargo(), 0xFF, false, false, 0);
+ CommandCost cost = std::get<0>(Command<CMD_REFIT_VEHICLE>::Do(DC_EXEC, v->index, v->current_order.GetRefitCargo(), 0xFF, false, false, 0));
cur_company.Restore();
if (cost.Failed()) {