summaryrefslogtreecommitdiffstats
path: root/modules/websocket/websocket_multiplayer_peer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/websocket/websocket_multiplayer_peer.cpp')
-rw-r--r--modules/websocket/websocket_multiplayer_peer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp
index 9e706dbeef..332cf93d36 100644
--- a/modules/websocket/websocket_multiplayer_peer.cpp
+++ b/modules/websocket/websocket_multiplayer_peer.cpp
@@ -124,7 +124,7 @@ Error WebSocketMultiplayerPeer::get_packet(const uint8_t **r_buffer, int &r_buff
current_packet.data = nullptr;
}
- ERR_FAIL_COND_V(incoming_packets.size() == 0, ERR_UNAVAILABLE);
+ ERR_FAIL_COND_V(incoming_packets.is_empty(), ERR_UNAVAILABLE);
current_packet = incoming_packets.front()->get();
incoming_packets.pop_front();
@@ -164,7 +164,7 @@ void WebSocketMultiplayerPeer::set_target_peer(int p_target_peer) {
}
int WebSocketMultiplayerPeer::get_packet_peer() const {
- ERR_FAIL_COND_V(incoming_packets.size() == 0, 1);
+ ERR_FAIL_COND_V(incoming_packets.is_empty(), 1);
return incoming_packets.front()->get().source;
}