summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-03 17:15:48 +0200
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit549caca39cebc8c988f4e51d79d353cab4646d58 (patch)
tree6739fb0721fae36d6fc58eabd4be642062386dee /src/build_vehicle_gui.cpp
parentb6933a2ebdf66c5fb23b2226d3ce07d71426d7d2 (diff)
downloadopenttd-549caca39cebc8c988f4e51d79d353cab4646d58.tar.xz
Codechange: Move command arguments to the back of the networked command function calls.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r--src/build_vehicle_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 6bee767b0..aafc0a950 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -1458,7 +1458,7 @@ struct BuildVehicleWindow : Window {
case WID_BV_SHOW_HIDE: {
const Engine *e = (this->sel_engine == INVALID_ENGINE) ? nullptr : Engine::Get(this->sel_engine);
if (e != nullptr) {
- DoCommandP(0, 0, this->sel_engine | (e->IsHidden(_current_company) ? 0 : (1u << 31)), CMD_SET_VEHICLE_VISIBILITY);
+ DoCommandP(CMD_SET_VEHICLE_VISIBILITY, 0, 0, this->sel_engine | (e->IsHidden(_current_company) ? 0 : (1u << 31)));
}
break;
}
@@ -1469,7 +1469,7 @@ struct BuildVehicleWindow : Window {
CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? CcBuildWagon : CcBuildPrimaryVehicle;
CargoID cargo = this->cargo_filter[this->cargo_filter_criteria];
if (cargo == CF_ANY || cargo == CF_ENGINES) cargo = CF_NONE;
- DoCommandP(this->window_number, sel_eng | (cargo << 24), 0, GetCmdBuildVeh(this->vehicle_type), callback);
+ DoCommandP(GetCmdBuildVeh(this->vehicle_type), callback, this->window_number, sel_eng | (cargo << 24), 0);
}
break;
}
@@ -1634,7 +1634,7 @@ struct BuildVehicleWindow : Window {
{
if (str == nullptr) return;
- DoCommandP(0, this->rename_engine, 0, CMD_RENAME_ENGINE | CMD_MSG(STR_ERROR_CAN_T_RENAME_TRAIN_TYPE + this->vehicle_type), nullptr, str);
+ DoCommandP(CMD_RENAME_ENGINE | CMD_MSG(STR_ERROR_CAN_T_RENAME_TRAIN_TYPE + this->vehicle_type), 0, this->rename_engine, 0, str);
}
void OnDropdownSelect(int widget, int index) override