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:
@@ -41,7 +41,6 @@ WebSocketServer::~WebSocketServer() {
|
||||
}
|
||||
|
||||
void WebSocketServer::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("is_listening"), &WebSocketServer::is_listening);
|
||||
ClassDB::bind_method(D_METHOD("listen", "port", "protocols", "gd_mp_api"), &WebSocketServer::listen, DEFVAL(Vector<String>()), DEFVAL(false));
|
||||
ClassDB::bind_method(D_METHOD("stop"), &WebSocketServer::stop);
|
||||
@@ -117,12 +116,10 @@ NetworkedMultiplayerPeer::ConnectionStatus WebSocketServer::get_connection_statu
|
||||
}
|
||||
|
||||
bool WebSocketServer::is_server() const {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void WebSocketServer::_on_peer_packet(int32_t p_peer_id) {
|
||||
|
||||
if (_is_multiplayer) {
|
||||
_process_multiplayer(get_peer(p_peer_id), p_peer_id);
|
||||
} else {
|
||||
@@ -131,7 +128,6 @@ void WebSocketServer::_on_peer_packet(int32_t p_peer_id) {
|
||||
}
|
||||
|
||||
void WebSocketServer::_on_connect(int32_t p_peer_id, String p_protocol) {
|
||||
|
||||
if (_is_multiplayer) {
|
||||
// Send add to clients
|
||||
_send_add(p_peer_id);
|
||||
@@ -142,7 +138,6 @@ void WebSocketServer::_on_connect(int32_t p_peer_id, String p_protocol) {
|
||||
}
|
||||
|
||||
void WebSocketServer::_on_disconnect(int32_t p_peer_id, bool p_was_clean) {
|
||||
|
||||
if (_is_multiplayer) {
|
||||
// Send delete to clients
|
||||
_send_del(p_peer_id);
|
||||
@@ -153,6 +148,5 @@ void WebSocketServer::_on_disconnect(int32_t p_peer_id, bool p_was_clean) {
|
||||
}
|
||||
|
||||
void WebSocketServer::_on_close_request(int32_t p_peer_id, int p_code, String p_reason) {
|
||||
|
||||
emit_signal("client_close_request", p_peer_id, p_code, p_reason);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user