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 23:14:38 +0200
commit764a1cc30404861757d9a99e7f0e20341d6ea353 (patch)
tree2b1f711de258a4396eaf6c2012e3124bb796681b /src
parentec520e1a5ed27b3eb414627acf7ad7f9cd661346 (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 () {}