diff options
author | rubidium42 <rubidium@openttd.org> | 2021-04-30 15:39:46 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-01 19:36:22 +0200 |
commit | 0eb17a70af86d11e49d9560088900c9d65cb07c1 (patch) | |
tree | fedba51ce64becd7ad2e5a0affac3300db45c48b | |
parent | 67063ceeb3832a7e0f608859ccbd5e79214e9853 (diff) | |
download | openttd-0eb17a70af86d11e49d9560088900c9d65cb07c1.tar.xz |
Codechange: rename NetworkError to ShowNetworkError
-rw-r--r-- | src/network/core/tcp_listen.h | 2 | ||||
-rw-r--r-- | src/network/network.cpp | 4 | ||||
-rw-r--r-- | src/network/network_client.cpp | 2 | ||||
-rw-r--r-- | src/network/network_internal.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/network/core/tcp_listen.h b/src/network/core/tcp_listen.h index 168f49f94..2ceea20aa 100644 --- a/src/network/core/tcp_listen.h +++ b/src/network/core/tcp_listen.h @@ -151,7 +151,7 @@ public: if (sockets.size() == 0) { DEBUG(net, 0, "[server] could not start network: could not create listening socket"); - NetworkError(STR_NETWORK_ERROR_SERVER_START); + ShowNetworkError(STR_NETWORK_ERROR_SERVER_START); return false; } diff --git a/src/network/network.cpp b/src/network/network.cpp index ce79f4c51..af732facd 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -277,7 +277,7 @@ uint NetworkCalculateLag(const NetworkClientSocket *cs) /* There was a non-recoverable error, drop back to the main menu with a nice * error */ -void NetworkError(StringID error_string) +void ShowNetworkError(StringID error_string) { _switch_mode = SM_MENU; ShowErrorMessage(error_string, INVALID_STRING_ID, WL_CRITICAL); @@ -701,7 +701,7 @@ public: void OnFailure() override { - NetworkError(STR_NETWORK_ERROR_NOCONNECTION); + ShowNetworkError(STR_NETWORK_ERROR_NOCONNECTION); } void OnConnect(SOCKET s) override diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index ceb146333..d288c71a6 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -284,7 +284,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res) #else if (_sync_seed_1 != _random.state[0]) { #endif - NetworkError(STR_NETWORK_ERROR_DESYNC); + ShowNetworkError(STR_NETWORK_ERROR_DESYNC); DEBUG(desync, 1, "sync_err: %08x; %02x", _date, _date_fract); DEBUG(net, 0, "Sync error detected!"); my_client->ClientError(NETWORK_RECV_STATUS_DESYNC); diff --git a/src/network/network_internal.h b/src/network/network_internal.h index be5b74a0f..1fba1228a 100644 --- a/src/network/network_internal.h +++ b/src/network/network_internal.h @@ -112,7 +112,7 @@ void NetworkExecuteLocalCommandQueue(); void NetworkFreeLocalCommandQueue(); void NetworkSyncCommandQueue(NetworkClientSocket *cs); -void NetworkError(StringID error_string); +void ShowNetworkError(StringID error_string); void NetworkTextMessage(NetworkAction action, TextColour colour, bool self_send, const char *name, const char *str = "", int64 data = 0); uint NetworkCalculateLag(const NetworkClientSocket *cs); StringID GetNetworkErrorMsg(NetworkErrorCode err); |