Replace error checks against size with is_empty

This commit is contained in:
A Thousand Ships
2024-01-19 13:21:39 +01:00
parent 94dbf69f5d
commit 684752e75b
58 changed files with 116 additions and 116 deletions

View File

@ -90,7 +90,7 @@ int ENetPacketPeer::get_available_packet_count() const {
Error ENetPacketPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
ERR_FAIL_NULL_V(peer, ERR_UNCONFIGURED);
ERR_FAIL_COND_V(!packet_queue.size(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(packet_queue.is_empty(), ERR_UNAVAILABLE);
if (last_packet) {
enet_packet_destroy(last_packet);
last_packet = nullptr;