mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-05-04 16:28:26 +02: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
|
inline bool operator==(const message_t &other) const ZMQ_NOTHROW
|
||||||
{
|
{
|
||||||
size_t my_size = size ();
|
const size_t my_size = size ();
|
||||||
if (size () != other.size ())
|
return my_size == other.size () && 0 == memcmp (data (), other.data (), my_size);
|
||||||
return false;
|
|
||||||
return 0 == memcmp (data (), other.data (), my_size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator!=(const message_t &other) const ZMQ_NOTHROW
|
inline bool operator!=(const message_t &other) const ZMQ_NOTHROW
|
||||||
|
Loading…
x
Reference in New Issue
Block a user