You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +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:
@@ -33,7 +33,6 @@
|
||||
GDCINULL(WebSocketClient);
|
||||
|
||||
WebSocketClient::WebSocketClient() {
|
||||
|
||||
verify_ssl = true;
|
||||
}
|
||||
|
||||
@@ -76,33 +75,27 @@ Error WebSocketClient::connect_to_url(String p_url, const Vector<String> p_proto
|
||||
}
|
||||
|
||||
void WebSocketClient::set_verify_ssl_enabled(bool p_verify_ssl) {
|
||||
|
||||
verify_ssl = p_verify_ssl;
|
||||
}
|
||||
|
||||
bool WebSocketClient::is_verify_ssl_enabled() const {
|
||||
|
||||
return verify_ssl;
|
||||
}
|
||||
|
||||
Ref<X509Certificate> WebSocketClient::get_trusted_ssl_certificate() const {
|
||||
|
||||
return ssl_cert;
|
||||
}
|
||||
|
||||
void WebSocketClient::set_trusted_ssl_certificate(Ref<X509Certificate> p_cert) {
|
||||
|
||||
ERR_FAIL_COND(get_connection_status() != CONNECTION_DISCONNECTED);
|
||||
ssl_cert = p_cert;
|
||||
}
|
||||
|
||||
bool WebSocketClient::is_server() const {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void WebSocketClient::_on_peer_packet() {
|
||||
|
||||
if (_is_multiplayer) {
|
||||
_process_multiplayer(get_peer(1), 1);
|
||||
} else {
|
||||
@@ -111,7 +104,6 @@ void WebSocketClient::_on_peer_packet() {
|
||||
}
|
||||
|
||||
void WebSocketClient::_on_connect(String p_protocol) {
|
||||
|
||||
if (_is_multiplayer) {
|
||||
// need to wait for ID confirmation...
|
||||
} else {
|
||||
@@ -120,12 +112,10 @@ void WebSocketClient::_on_connect(String p_protocol) {
|
||||
}
|
||||
|
||||
void WebSocketClient::_on_close_request(int p_code, String p_reason) {
|
||||
|
||||
emit_signal("server_close_request", p_code, p_reason);
|
||||
}
|
||||
|
||||
void WebSocketClient::_on_disconnect(bool p_was_clean) {
|
||||
|
||||
if (_is_multiplayer) {
|
||||
emit_signal("connection_failed");
|
||||
} else {
|
||||
@@ -134,7 +124,6 @@ void WebSocketClient::_on_disconnect(bool p_was_clean) {
|
||||
}
|
||||
|
||||
void WebSocketClient::_on_error() {
|
||||
|
||||
if (_is_multiplayer) {
|
||||
emit_signal("connection_failed");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user