summaryrefslogtreecommitdiff
path: root/hitlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'hitlist.h')
-rw-r--r--hitlist.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/hitlist.h b/hitlist.h
index 76832db..c804b4e 100644
--- a/hitlist.h
+++ b/hitlist.h
@@ -30,7 +30,15 @@ class hitlist {
public:
hitlist() = default;
- hitlist(hitlist &other) = delete; // do not copy the world
+ hitlist(hitlist &other) {
+ objects = other.objects;
+ }
+
+ hitlist(hitlist &&other) noexcept {
+ objects = std::move(other.objects);
+ }
+
+ hitlist &operator=(const hitlist &other) = default;
// Add an object to the world.
void add_object(std::shared_ptr<object> &&obj) {