diff options
author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-02-08 21:33:54 +0000 |
---|---|---|
committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-02-08 21:33:54 +0000 |
commit | 6e3ab3d0ccc6ce42dc695e90fae5500cb9a796e9 (patch) | |
tree | 14dc7bde53fbf79cce811a9a62dcb4e0fba6e1b7 /cpp/src/qmf/engine/ObjectIdImpl.cpp | |
parent | 0dee1a643a3105ed95ed4c34f941236c48e25192 (diff) | |
download | qpid-python-6e3ab3d0ccc6ce42dc695e90fae5500cb9a796e9.tar.gz |
QPID-2396: add assignment operator to ObjectId class.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@907808 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qmf/engine/ObjectIdImpl.cpp')
-rw-r--r-- | cpp/src/qmf/engine/ObjectIdImpl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/qmf/engine/ObjectIdImpl.cpp b/cpp/src/qmf/engine/ObjectIdImpl.cpp index 76db6d91f9..670ee385a3 100644 --- a/cpp/src/qmf/engine/ObjectIdImpl.cpp +++ b/cpp/src/qmf/engine/ObjectIdImpl.cpp @@ -196,4 +196,14 @@ bool ObjectId::operator<(const ObjectId& other) const { return *impl < *other.im bool ObjectId::operator>(const ObjectId& other) const { return *impl > *other.impl; } bool ObjectId::operator<=(const ObjectId& other) const { return !(*impl > *other.impl); } bool ObjectId::operator>=(const ObjectId& other) const { return !(*impl < *other.impl); } +ObjectId& ObjectId::operator=(const ObjectId& other) { + ObjectIdImpl *old; + if (this != &other) { + old = impl; + impl = new ObjectIdImpl(*(other.impl)); + if (old) + delete old; + } + return *this; +} |