mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-11-11 00:44:50 +01:00
@@ -612,16 +612,26 @@ class multipart_t
|
||||
}
|
||||
|
||||
// Check if equal to other multipart
|
||||
bool equal(const multipart_t *other) const
|
||||
bool equal(const multipart_t *other) const ZMQ_NOTHROW
|
||||
{
|
||||
if (size() != other->size())
|
||||
return *this == *other;
|
||||
}
|
||||
|
||||
bool operator==(const multipart_t &other) const ZMQ_NOTHROW
|
||||
{
|
||||
if (size() != other.size())
|
||||
return false;
|
||||
for (size_t i = 0; i < size(); i++)
|
||||
if (*peek(i) != *other->peek(i))
|
||||
if (at(i) != other.at(i))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator!=(const multipart_t &other) const ZMQ_NOTHROW
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
#ifdef ZMQ_CPP11
|
||||
|
||||
// Return single part message_t encoded from this multipart_t.
|
||||
|
||||
Reference in New Issue
Block a user