From 92067b4714eaf0d2a9be6b4fc50cc9e156c74cad Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 15 Dec 2017 16:05:42 +0100 Subject: 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. --- drivers/unix/packet_peer_udp_posix.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/unix/packet_peer_udp_posix.h') diff --git a/drivers/unix/packet_peer_udp_posix.h b/drivers/unix/packet_peer_udp_posix.h index e580d336b2..ad7be5bbe0 100644 --- a/drivers/unix/packet_peer_udp_posix.h +++ b/drivers/unix/packet_peer_udp_posix.h @@ -41,12 +41,12 @@ class PacketPeerUDPPosix : public PacketPeerUDP { PACKET_BUFFER_SIZE = 65536 }; - mutable RingBuffer rb; + RingBuffer rb; uint8_t recv_buffer[PACKET_BUFFER_SIZE]; - mutable uint8_t packet_buffer[PACKET_BUFFER_SIZE]; - mutable IP_Address packet_ip; - mutable int packet_port; - mutable int queue_count; + uint8_t packet_buffer[PACKET_BUFFER_SIZE]; + IP_Address packet_ip; + int packet_port; + int queue_count; int sockfd; bool sock_blocking; IP::Type sock_type; @@ -62,7 +62,7 @@ class PacketPeerUDPPosix : public PacketPeerUDP { public: virtual int get_available_packet_count() const; - virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) const; + virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size); virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size); virtual int get_max_packet_size() const; -- cgit v1.2.3