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:
authorJacques Lucke <jacques@blender.org>2021-10-03 18:07:26 +0300
committerJacques Lucke <jacques@blender.org>2021-10-03 18:07:26 +0300
commit1833ebea31a73ff8a76d4742c51bad4dfc318cff (patch)
treeb5d8751eb96daeaeca39a043b9e63eea1d47faac
parentbf354cde9691cd26ad5110bd275a581976b06911 (diff)
Cleanup: move as_span method out of header
This method does not have to be in a header and results in a relatively large number of symbols to be generated (42).
-rw-r--r--source/blender/blenkernel/BKE_attribute_access.hh11
-rw-r--r--source/blender/blenkernel/intern/attribute_access.cc11
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh
index baa918d9949..20b48160feb 100644
--- a/source/blender/blenkernel/BKE_attribute_access.hh
+++ b/source/blender/blenkernel/BKE_attribute_access.hh
@@ -491,17 +491,6 @@ inline CustomDataType OutputAttribute::custom_data_type() const
return cpp_type_to_custom_data_type(this->cpp_type());
}
-inline fn::GMutableSpan OutputAttribute::as_span()
-{
- if (!optional_span_varray_) {
- const bool materialize_old_values = !ignore_old_values_;
- optional_span_varray_ = std::make_unique<fn::GVMutableArray_GSpan>(*varray_,
- materialize_old_values);
- }
- fn::GVMutableArray_GSpan &span_varray = *optional_span_varray_;
- return span_varray;
-}
-
template<typename T> inline MutableSpan<T> OutputAttribute::as_span()
{
return this->as_span().typed<T>();
diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc
index c2837b522c4..d686cd8fa55 100644
--- a/source/blender/blenkernel/intern/attribute_access.cc
+++ b/source/blender/blenkernel/intern/attribute_access.cc
@@ -202,6 +202,17 @@ AttributeDomain attribute_domain_highest_priority(Span<AttributeDomain> domains)
return highest_priority_domain;
}
+fn::GMutableSpan OutputAttribute::as_span()
+{
+ if (!optional_span_varray_) {
+ const bool materialize_old_values = !ignore_old_values_;
+ optional_span_varray_ = std::make_unique<fn::GVMutableArray_GSpan>(*varray_,
+ materialize_old_values);
+ }
+ fn::GVMutableArray_GSpan &span_varray = *optional_span_varray_;
+ return span_varray;
+}
+
void OutputAttribute::save()
{
save_has_been_called_ = true;