summaryrefslogtreecommitdiff
path: root/cpp/src/qmf/engine/ObjectIdImpl.cpp
diff options
context:
space:
mode:
authorKenneth Anthony Giusti <kgiusti@apache.org>2010-02-08 21:33:54 +0000
committerKenneth Anthony Giusti <kgiusti@apache.org>2010-02-08 21:33:54 +0000
commit6e3ab3d0ccc6ce42dc695e90fae5500cb9a796e9 (patch)
tree14dc7bde53fbf79cce811a9a62dcb4e0fba6e1b7 /cpp/src/qmf/engine/ObjectIdImpl.cpp
parent0dee1a643a3105ed95ed4c34f941236c48e25192 (diff)
downloadqpid-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.cpp10
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;
+}