summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-24 21:29:02 +0200
committerCarl Hetherington <cth@carlh.net>2022-04-24 21:29:02 +0200
commitfedc40304c498be386420b714cebbe9aa3b72fb9 (patch)
treebc3794a02915411e1fb307ec8a30821cf103ece0 /src
parent62ccbf5db9eb2ddbbca63af21d94bb76a2169db6 (diff)
Add copy constructor for Object.
Diffstat (limited to 'src')
-rw-r--r--src/object.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/object.h b/src/object.h
index d1d476c8..89da0fd8 100644
--- a/src/object.h
+++ b/src/object.h
@@ -70,8 +70,14 @@ public:
*/
explicit Object (std::string id);
- Object (Object const&) = delete;
- Object& operator= (Object const&) = delete;
+ Object(Object const& other)
+ : _id(other._id)
+ {}
+
+ Object& operator=(Object const& other) {
+ _id = other._id;
+ return *this;
+ }
virtual ~Object () {}