diff --git a/include/frnetlib/Packet.h b/include/frnetlib/Packet.h index 9525c73..ddb8cf2 100644 --- a/include/frnetlib/Packet.h +++ b/include/frnetlib/Packet.h @@ -82,7 +82,7 @@ namespace fr inline Packet &operator<<(const std::vector &vec) { //First store its length - *this << vec.size(); + *this << static_cast(vec.size()); //Now each of the elements for(const auto &iter : vec) @@ -99,7 +99,7 @@ namespace fr template inline Packet &operator>>(std::vector &vec) { - size_t length; + uint64_t length; //First extract the length *this >> length; @@ -568,7 +568,7 @@ namespace fr uint32_t length = htonl((uint32_t)buffer.size() - PACKET_HEADER_LENGTH); memcpy(&buffer[0], &length, sizeof(uint32_t)); - //Then a reference to the buffer + //Then return a reference to the buffer return buffer; }