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:
@ -68,7 +68,6 @@ void WebRTCDataChannelJS::_on_error() {
|
||||
}
|
||||
|
||||
void WebRTCDataChannelJS::_on_message(uint8_t *p_data, uint32_t p_size, bool p_is_string) {
|
||||
|
||||
ERR_FAIL_COND_MSG(in_buffer.space_left() < (int)(p_size + 5), "Buffer full! Dropping data.");
|
||||
|
||||
uint8_t is_string = p_is_string ? 1 : 0;
|
||||
|
||||
@ -320,7 +320,6 @@ Error WebRTCMultiplayer::put_packet(const uint8_t *p_buffer, int p_buffer_size)
|
||||
Map<int, Ref<ConnectedPeer>>::Element *E = nullptr;
|
||||
|
||||
if (target_peer > 0) {
|
||||
|
||||
E = peer_map.find(target_peer);
|
||||
ERR_FAIL_COND_V_MSG(!E, ERR_INVALID_PARAMETER, "Invalid target peer: " + itos(target_peer) + ".");
|
||||
|
||||
@ -332,7 +331,6 @@ Error WebRTCMultiplayer::put_packet(const uint8_t *p_buffer, int p_buffer_size)
|
||||
int exclude = -target_peer;
|
||||
|
||||
for (Map<int, Ref<ConnectedPeer>>::Element *F = peer_map.front(); F; F = F->next()) {
|
||||
|
||||
// Exclude packet. If target_peer == 0 then don't exclude any packets
|
||||
if (target_peer != 0 && F->key() == exclude)
|
||||
continue;
|
||||
|
||||
@ -35,7 +35,6 @@
|
||||
#include "webrtc_peer_connection.h"
|
||||
|
||||
class WebRTCMultiplayer : public NetworkedMultiplayerPeer {
|
||||
|
||||
GDCLASS(WebRTCMultiplayer, NetworkedMultiplayerPeer);
|
||||
|
||||
protected:
|
||||
@ -50,7 +49,6 @@ private:
|
||||
};
|
||||
|
||||
class ConnectedPeer : public Reference {
|
||||
|
||||
public:
|
||||
Ref<WebRTCPeerConnection> connection;
|
||||
List<Ref<WebRTCDataChannel>> channels;
|
||||
|
||||
@ -33,12 +33,10 @@
|
||||
WebRTCPeerConnection *(*WebRTCPeerConnection::_create)() = nullptr;
|
||||
|
||||
Ref<WebRTCPeerConnection> WebRTCPeerConnection::create_ref() {
|
||||
|
||||
return create();
|
||||
}
|
||||
|
||||
WebRTCPeerConnection *WebRTCPeerConnection::create() {
|
||||
|
||||
if (!_create)
|
||||
return nullptr;
|
||||
return _create();
|
||||
|
||||
@ -49,7 +49,6 @@ Error WebRTCPeerConnectionGDNative::set_default_library(const godot_net_webrtc_l
|
||||
}
|
||||
|
||||
WebRTCPeerConnection *WebRTCPeerConnectionGDNative::_create() {
|
||||
|
||||
WebRTCPeerConnectionGDNative *obj = memnew(WebRTCPeerConnectionGDNative);
|
||||
ERR_FAIL_COND_V_MSG(!default_library, obj, "Default GDNative WebRTC implementation not defined.");
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@
|
||||
#include "webrtc_peer_connection.h"
|
||||
|
||||
class WebRTCPeerConnectionJS : public WebRTCPeerConnection {
|
||||
|
||||
private:
|
||||
int _js_id;
|
||||
ConnectionState _conn_state;
|
||||
|
||||
Reference in New Issue
Block a user