projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62ccbf5
)
Add copy constructor for Object.
author
Carl Hetherington
<cth@carlh.net>
Sun, 24 Apr 2022 19:29:02 +0000
(21:29 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 24 Apr 2022 19:29:02 +0000
(21:29 +0200)
src/object.h
patch
|
blob
|
history
diff --git
a/src/object.h
b/src/object.h
index d1d476c8caba7fb332702927048943cc813b1923..89da0fd8d7e36cae534ff2b1b25c35e8a1708a21 100644
(file)
--- 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 () {}