mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-03-01 10:57:59 +01:00
Problem: bad code style in operator==
Solution: simplified code
This commit is contained in:
parent
4d0418750e
commit
2aac1dffa3
6
zmq.hpp
6
zmq.hpp
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user