Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-03-11 20:34:03 +0300
committerHans Goudey <h.goudey@me.com>2022-03-11 20:34:03 +0300
commit22807d2075b0bcc7b5ae655ba43b08a4e44b002b (patch)
tree190043a64dfd78722804a40bd9b3ad835b851e16 /source/blender/blenkernel/BKE_curves.hh
parent3b28c785d4e438428af3aa513d56f5fd394498e4 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/BKE_curves.hh')
-rw-r--r--source/blender/blenkernel/BKE_curves.hh2
1 files changed, 2 insertions, 0 deletions
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)