summaryrefslogtreecommitdiff
path: root/src/WebRTCLibPeerConnection.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-07-09 18:42:30 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-07-09 18:55:32 +0200
commit69f92fa26c7bef3b042d8da5e520fe60b22e01b7 (patch)
tree3157fbaec9bb148c64cb4fd3fa40bad6e8ad3864 /src/WebRTCLibPeerConnection.cpp
parentd06e536d12bd6eff02de4fdfbba86f25d1c048fc (diff)
downloadgodot-webrtc-native-69f92fa26c7bef3b042d8da5e520fe60b22e01b7.tar.gz
godot-webrtc-native-69f92fa26c7bef3b042d8da5e520fe60b22e01b7.tar.bz2
godot-webrtc-native-69f92fa26c7bef3b042d8da5e520fe60b22e01b7.zip
Run clang-format on src/*
Diffstat (limited to 'src/WebRTCLibPeerConnection.cpp')
-rw-r--r--src/WebRTCLibPeerConnection.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/WebRTCLibPeerConnection.cpp b/src/WebRTCLibPeerConnection.cpp
index 348cdcb..d090654 100644
--- a/src/WebRTCLibPeerConnection.cpp
+++ b/src/WebRTCLibPeerConnection.cpp
@@ -28,9 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include "WebRTCLibPeerConnection.hpp"
#include "WebRTCDataChannel.hpp"
#include "WebRTCDataChannelGDNative.hpp"
-#include "WebRTCLibPeerConnection.hpp"
#include "WebRTCLibDataChannel.hpp"
using namespace godot_webrtc;
@@ -114,7 +114,12 @@ godot_error _parse_ice_server(webrtc::PeerConnectionInterface::RTCConfiguration
godot_error _parse_channel_config(webrtc::DataChannelInit &r_config, godot::Dictionary p_dict) {
godot::Variant v;
-#define _SET_N(PROP, PNAME, TYPE) if (p_dict.has(#PROP)) { v = p_dict[#PROP]; if(v.get_type() == godot::Variant::TYPE) r_config.PNAME = v; }
+#define _SET_N(PROP, PNAME, TYPE) \
+ if (p_dict.has(#PROP)) { \
+ v = p_dict[#PROP]; \
+ if (v.get_type() == godot::Variant::TYPE) \
+ r_config.PNAME = v; \
+ }
#define _SET(PROP, TYPE) _SET_N(PROP, PROP, TYPE)
_SET(negotiated, BOOL);
_SET(id, INT);
@@ -137,7 +142,7 @@ WebRTCLibPeerConnection::ConnectionState WebRTCLibPeerConnection::get_connection
ERR_FAIL_COND_V(peer_connection.get() == nullptr, STATE_CLOSED);
webrtc::PeerConnectionInterface::IceConnectionState state = peer_connection->ice_connection_state();
- switch(state) {
+ switch (state) {
case webrtc::PeerConnectionInterface::kIceConnectionNew:
return STATE_NEW;
case webrtc::PeerConnectionInterface::kIceConnectionChecking:
@@ -248,7 +253,7 @@ void WebRTCLibPeerConnection::close() {
peer_connection->Close();
}
peer_connection = nullptr;
- while(!signal_queue.empty()) {
+ while (!signal_queue.empty()) {
signal_queue.pop();
}
}