Problem: bad code style in operator==

Solution: simplified code
This commit is contained in:
Simon Giesecke 2018-04-13 11:38:16 -04:00
parent 4d0418750e
commit 2aac1dffa3

View File

@ -393,10 +393,8 @@ namespace zmq
inline bool operator==(const message_t &other) const ZMQ_NOTHROW
{
size_t my_size = size ();
if (size () != other.size ())
return false;
return 0 == memcmp (data (), other.data (), my_size);
const size_t my_size = size ();
return my_size == other.size () && 0 == memcmp (data (), other.data (), my_size);
}
inline bool operator!=(const message_t &other) const ZMQ_NOTHROW