summaryrefslogtreecommitdiff
path: root/src/network/network_gui.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-18 20:57:44 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-27 18:49:43 +0200
commit8ffb4122df903393bceca49a25ac81cc42cca3ff (patch)
tree0e1d390cc284f83e8cde908f33e6d901e2533d0f /src/network/network_gui.cpp
parentdb54e208256958f721bf74bf058b45039be5b488 (diff)
downloadopenttd-8ffb4122df903393bceca49a25ac81cc42cca3ff.tar.xz
Codechange: just pass the SettingDesc to SetSettingValue and remove distinction between (non)company
Diffstat (limited to 'src/network/network_gui.cpp')
-rw-r--r--src/network/network_gui.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index f0c28530a..e37843db8 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -2199,9 +2199,7 @@ public:
case WID_CL_SERVER_NAME_EDIT: {
if (!_network_server) break;
- uint index;
- GetSettingFromName("network.server_name", &index);
- SetSettingValue(index, StrEmpty(str) ? "Unnamed Server" : str);
+ SetSettingValue(GetSettingFromName("network.server_name"), StrEmpty(str) ? "Unnamed Server" : str);
this->InvalidateData();
break;
}
@@ -2210,9 +2208,7 @@ public:
std::string client_name(str);
if (!NetworkValidateClientName(client_name)) break;
- uint index;
- GetSettingFromName("network.client_name", &index);
- SetSettingValue(index, client_name.c_str());
+ SetSettingValue(GetSettingFromName("network.client_name"), client_name.c_str());
this->InvalidateData();
break;
}