diff --git a/zmq.hpp b/zmq.hpp index 54b4721..2e72db6 100644 --- a/zmq.hpp +++ b/zmq.hpp @@ -388,11 +388,7 @@ namespace zmq ZMQ_DEPRECATED("from 4.3.0, use operator== instead") inline bool equal(const message_t* other) const ZMQ_NOTHROW { - if (size() != other->size()) - return false; - const std::string a(data<char>(), size()); - const std::string b(other->data<char>(), other->size()); - return a == b; + return *this == *other; } inline bool operator==(const message_t &other) const ZMQ_NOTHROW