You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user