[Bf-blender-cvs] [bf354cde969] master: Cleanup: move special methods of geometry set out of header
Jacques Lucke
noreply at git.blender.org
Sun Oct 3 16:58:40 CEST 2021
Commit: bf354cde9691cd26ad5110bd275a581976b06911
Author: Jacques Lucke
Date: Sun Oct 3 16:58:33 2021 +0200
Branches: master
https://developer.blender.org/rBbf354cde9691cd26ad5110bd275a581976b06911
Cleanup: move special methods of geometry set out of header
This reduces the compile time, because fewer symbols have to be generated
in translation units using geometry sets.
===================================================================
M source/blender/blenkernel/BKE_geometry_set.hh
M source/blender/blenkernel/intern/geometry_set.cc
===================================================================
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index f182fb527e1..b36d15578a7 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -253,6 +253,13 @@ struct GeometrySet {
blender::Map<GeometryComponentType, GeometryComponentPtr> components_;
public:
+ GeometrySet();
+ GeometrySet(const GeometrySet &other);
+ GeometrySet(GeometrySet &&other);
+ ~GeometrySet();
+ GeometrySet &operator=(const GeometrySet &other);
+ GeometrySet &operator=(GeometrySet &&other);
+
GeometryComponent &get_component_for_write(GeometryComponentType component_type);
template<typename Component> Component &get_component_for_write()
{
diff --git a/source/blender/blenkernel/intern/geometry_set.cc b/source/blender/blenkernel/intern/geometry_set.cc
index 0aac6ae3adf..84daa06554a 100644
--- a/source/blender/blenkernel/intern/geometry_set.cc
+++ b/source/blender/blenkernel/intern/geometry_set.cc
@@ -105,6 +105,14 @@ bool GeometryComponent::is_empty() const
/** \name Geometry Set
* \{ */
+/* The methods are defaulted here so that they are not instantiated in every translation unit. */
+GeometrySet::GeometrySet() = default;
+GeometrySet::GeometrySet(const GeometrySet &other) = default;
+GeometrySet::GeometrySet(GeometrySet &&other) = default;
+GeometrySet::~GeometrySet() = default;
+GeometrySet &GeometrySet::operator=(const GeometrySet &other) = default;
+GeometrySet &GeometrySet::operator=(GeometrySet &&other) = default;
+
/* This method can only be used when the geometry set is mutable. It returns a mutable geometry
* component of the given type.
*/
More information about the Bf-blender-cvs
mailing list