diff options
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.hh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index 08bfdbf2382..f6a58e57298 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -509,6 +509,13 @@ class InstanceReference { } } + InstanceReference(InstanceReference &&other) + : type_(other.type_), data_(other.data_), geometry_set_(std::move(other.geometry_set_)) + { + other.type_ = Type::None; + other.data_ = nullptr; + } + InstanceReference &operator=(const InstanceReference &other) { if (this == &other) { @@ -519,6 +526,16 @@ class InstanceReference { return *this; } + InstanceReference &operator=(InstanceReference &&other) + { + if (this == &other) { + return *this; + } + this->~InstanceReference(); + new (this) InstanceReference(std::move(other)); + return *this; + } + Type type() const { return type_; |