diff options
| author | Ted Ross <tross@apache.org> | 2011-07-12 16:11:34 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2011-07-12 16:11:34 +0000 |
| commit | 461f9b271c370dc200c3b2f54197bea65337e7c7 (patch) | |
| tree | bdca0b9a5fe60421da00fc3ad01a4eb4a8bae43d /qpid/cpp/src/qmf/DataAddr.cpp | |
| parent | 6bc2dfcb32f4b6af4c24a51a664c4ab838d8a3fa (diff) | |
| download | qpid-python-461f9b271c370dc200c3b2f54197bea65337e7c7.tar.gz | |
QPID-3344 - Comparisons of const DataAddr objects are incorrect
Applied patch from Zane Bitter
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1145644 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qmf/DataAddr.cpp')
| -rw-r--r-- | qpid/cpp/src/qmf/DataAddr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qpid/cpp/src/qmf/DataAddr.cpp b/qpid/cpp/src/qmf/DataAddr.cpp index fb51d5787f..d16e12062e 100644 --- a/qpid/cpp/src/qmf/DataAddr.cpp +++ b/qpid/cpp/src/qmf/DataAddr.cpp @@ -36,7 +36,9 @@ DataAddr::~DataAddr() { PI::dtor(*this); } DataAddr& DataAddr::operator=(const DataAddr& s) { return PI::assign(*this, s); } bool DataAddr::operator==(const DataAddr& o) { return *impl == *o.impl; } +bool DataAddr::operator==(const DataAddr& o) const { return *impl == *o.impl; } bool DataAddr::operator<(const DataAddr& o) { return *impl < *o.impl; } +bool DataAddr::operator<(const DataAddr& o) const { return *impl < *o.impl; } DataAddr::DataAddr(const qpid::types::Variant::Map& m) { PI::ctor(*this, new DataAddrImpl(m)); } DataAddr::DataAddr(const string& n, const string& a, uint32_t e) { PI::ctor(*this, new DataAddrImpl(n, a, e)); } @@ -45,7 +47,7 @@ const string& DataAddr::getAgentName() const { return impl->getAgentName(); } uint32_t DataAddr::getAgentEpoch() const { return impl->getAgentEpoch(); } Variant::Map DataAddr::asMap() const { return impl->asMap(); } -bool DataAddrImpl::operator==(const DataAddrImpl& other) +bool DataAddrImpl::operator==(const DataAddrImpl& other) const { return agentName == other.agentName && @@ -54,7 +56,7 @@ bool DataAddrImpl::operator==(const DataAddrImpl& other) } -bool DataAddrImpl::operator<(const DataAddrImpl& other) +bool DataAddrImpl::operator<(const DataAddrImpl& other) const { if (agentName < other.agentName) return true; if (agentName > other.agentName) return false; |
