summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-31 19:39:09 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit0f64ee5ce1548d9cda69917f27c5b1a3cb91823d (patch)
tree161f0e6ac300e604de61b8203b5a58279637f9eb /src/settings.cpp
parente740c24eb7a90bc771f5976d64d80639ee7576e5 (diff)
downloadopenttd-0f64ee5ce1548d9cda69917f27c5b1a3cb91823d.tar.xz
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 1bf651304..63c7478a0 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1550,7 +1550,7 @@ bool SetSettingValue(const IntSettingDesc *sd, int32 value, bool force_newgame)
const IntSettingDesc *setting = sd->AsIntSetting();
if ((setting->flags & SF_PER_COMPANY) != 0) {
if (Company::IsValidID(_local_company) && _game_mode != GM_MENU) {
- return DoCommandP(CMD_CHANGE_COMPANY_SETTING, 0, 0, value, setting->GetName());
+ return Command<CMD_CHANGE_COMPANY_SETTING>::Post(0, 0, value, setting->GetName());
}
setting->ChangeValue(&_settings_client.company, value);
@@ -1576,7 +1576,7 @@ bool SetSettingValue(const IntSettingDesc *sd, int32 value, bool force_newgame)
/* send non-company-based settings over the network */
if (!_networking || (_networking && _network_server)) {
- return DoCommandP(CMD_CHANGE_SETTING, 0, 0, value, setting->GetName());
+ return Command<CMD_CHANGE_SETTING>::Post(0, 0, value, setting->GetName());
}
return false;
}