summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-04-27 21:10:11 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-13 23:13:17 +0200
commitcc6c078dec3792173b5d2057667bec9597c71d90 (patch)
tree3634a76f302f1dbae914679fe7097da7df6b9e5c /src/network
parentc73d64adf984036a99d6974b130eda65dfc18c6c (diff)
downloadopenttd-cc6c078dec3792173b5d2057667bec9597c71d90.tar.xz
Codechange: move hostnames in settings to std::string
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network.cpp2
-rw-r--r--src/network/network_gui.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index b9160e208..94566d232 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -824,7 +824,7 @@ void NetworkClientJoinGame()
NetworkDisconnect();
NetworkInitialize();
- strecpy(_settings_client.network.last_joined, _network_join.connection_string.c_str(), lastof(_settings_client.network.last_joined));
+ _settings_client.network.last_joined = _network_join.connection_string;
_network_join_status = NETWORK_JOIN_STATUS_CONNECTING;
ShowJoinStatusWindow();
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 67992cac7..ca0e67d0a 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -828,7 +828,7 @@ public:
void OnQueryTextFinished(char *str) override
{
if (!StrEmpty(str)) {
- strecpy(_settings_client.network.connect_to_ip, str, lastof(_settings_client.network.connect_to_ip));
+ _settings_client.network.connect_to_ip = str;
NetworkAddServer(str);
NetworkRebuildHostList();
}
@@ -1556,7 +1556,7 @@ static void ShowNetworkLobbyWindow(NetworkGameList *ngl)
DeleteWindowById(WC_NETWORK_WINDOW, WN_NETWORK_WINDOW_START);
DeleteWindowById(WC_NETWORK_WINDOW, WN_NETWORK_WINDOW_GAME);
- strecpy(_settings_client.network.last_joined, ngl->connection_string.c_str(), lastof(_settings_client.network.last_joined));
+ _settings_client.network.last_joined = ngl->connection_string;
NetworkQueryLobbyServer(ngl->connection_string);