From 22807d2075b0bcc7b5ae655ba43b08a4e44b002b Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 11 Mar 2022 11:34:03 -0600 Subject: Curves: Move constructor/assignment Add the ability to move `CurvesGeometry` without copying its attributes and data. The benefit is more intuitive management of the data-block copying, and less overhead for copying in some cases. The "moved-from" source is left in an empty but valid state. A test file is added to test the move constructor. --- source/blender/blenkernel/BKE_curves.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/BKE_curves.hh') diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index 6cab9c8ff90..875cf48ed43 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -62,7 +62,9 @@ class CurvesGeometry : public ::CurvesGeometry { */ CurvesGeometry(int point_size, int curve_size); CurvesGeometry(const CurvesGeometry &other); + CurvesGeometry(CurvesGeometry &&other); CurvesGeometry &operator=(const CurvesGeometry &other); + CurvesGeometry &operator=(CurvesGeometry &&other); ~CurvesGeometry(); static CurvesGeometry &wrap(::CurvesGeometry &dna_struct) -- cgit v1.2.3