1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Remove "const" from PacketPeer get_packet/get_var

They are NOT constant methods, as state by the comment message,
they fetch the last packet and then forget about it, actively
changing the state of the object.
This commit is contained in:
Fabio Alessandrelli
2017-12-15 16:05:42 +01:00
parent 72d5ae84b3
commit 92067b4714
8 changed files with 31 additions and 31 deletions

View File

@@ -386,7 +386,7 @@ int NetworkedMultiplayerENet::get_available_packet_count() const {
return incoming_packets.size();
}
Error NetworkedMultiplayerENet::get_packet(const uint8_t **r_buffer, int &r_buffer_size) const {
Error NetworkedMultiplayerENet::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
ERR_FAIL_COND_V(incoming_packets.size() == 0, ERR_UNAVAILABLE);
@@ -480,7 +480,7 @@ int NetworkedMultiplayerENet::get_max_packet_size() const {
return 1 << 24; //anything is good
}
void NetworkedMultiplayerENet::_pop_current_packet() const {
void NetworkedMultiplayerENet::_pop_current_packet() {
if (current_packet.packet) {
enet_packet_destroy(current_packet.packet);