diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-23 11:55:22 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-27 18:49:43 +0200 |
commit | 72ec81325b201931525e5c5f79abc6eb1de8d7a8 (patch) | |
tree | 668d049ad2aa4f8ff99122e90f9b860eaae12d93 /src/network | |
parent | 0d6597a9e6255193c306537aa0061b5a89b7c658 (diff) | |
download | openttd-72ec81325b201931525e5c5f79abc6eb1de8d7a8.tar.xz |
Cleanup: remove unneeded temporary variables and casts
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index e37843db8..3c61cf77a 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -2199,7 +2199,7 @@ public: case WID_CL_SERVER_NAME_EDIT: { if (!_network_server) break; - SetSettingValue(GetSettingFromName("network.server_name"), StrEmpty(str) ? "Unnamed Server" : str); + SetSettingValue(GetSettingFromName("network.server_name")->AsStringSetting(), StrEmpty(str) ? "Unnamed Server" : str); this->InvalidateData(); break; } @@ -2208,7 +2208,7 @@ public: std::string client_name(str); if (!NetworkValidateClientName(client_name)) break; - SetSettingValue(GetSettingFromName("network.client_name"), client_name.c_str()); + SetSettingValue(GetSettingFromName("network.client_name")->AsStringSetting(), client_name.c_str()); this->InvalidateData(); break; } |