summaryrefslogtreecommitdiff
path: root/modules/websocket/emws_client.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-14 13:23:58 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 16:54:55 +0200
commit0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch)
treea27e497da7104dd0a64f98a04fa3067668735e91 /modules/websocket/emws_client.cpp
parent710b34b70227becdc652b4ae027fe0ac47409642 (diff)
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
Diffstat (limited to 'modules/websocket/emws_client.cpp')
-rw-r--r--modules/websocket/emws_client.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/modules/websocket/emws_client.cpp b/modules/websocket/emws_client.cpp
index bc9d75d327..7c31449709 100644
--- a/modules/websocket/emws_client.cpp
+++ b/modules/websocket/emws_client.cpp
@@ -65,7 +65,6 @@ EMSCRIPTEN_KEEPALIVE void _esws_on_close(void *obj, int code, char *reason, int
}
Error EMWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, const Vector<String> p_protocols, const Vector<String> p_custom_headers) {
-
String proto_string;
for (int i = 0; i < p_protocols.size(); i++) {
if (i != 0)
@@ -190,12 +189,10 @@ void EMWSClient::poll() {
}
Ref<WebSocketPeer> EMWSClient::get_peer(int p_peer_id) const {
-
return _peer;
}
NetworkedMultiplayerPeer::ConnectionStatus EMWSClient::get_connection_status() const {
-
if (_peer->is_connected_to_host()) {
if (_is_connecting)
return CONNECTION_CONNECTING;
@@ -206,17 +203,14 @@ NetworkedMultiplayerPeer::ConnectionStatus EMWSClient::get_connection_status() c
};
void EMWSClient::disconnect_from_host(int p_code, String p_reason) {
-
_peer->close(p_code, p_reason);
};
IP_Address EMWSClient::get_connected_host() const {
-
ERR_FAIL_V_MSG(IP_Address(), "Not supported in HTML5 export.");
};
uint16_t EMWSClient::get_connected_port() const {
-
ERR_FAIL_V_MSG(0, "Not supported in HTML5 export.");
};
@@ -244,7 +238,6 @@ EMWSClient::EMWSClient() {
};
EMWSClient::~EMWSClient() {
-
disconnect_from_host();
_peer = Ref<EMWSPeer>();
/* clang-format off */