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.
This commit is contained in:
Jacques Lucke 2021-10-03 16:58:33 +02:00
parent 64d07ffcc3
commit bf354cde96
2 changed files with 15 additions and 0 deletions

View File

@ -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()
{

View File

@ -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.
*/