Fix: Fix attribute writer debug warnings in terminal

Use an imperfect solution, since this code will be replaced soon anyway.
This commit is contained in:
Hans Goudey 2022-07-25 16:06:13 -05:00
parent 462f99bf38
commit f76a2c0d18
1 changed files with 10 additions and 6 deletions

View File

@ -126,18 +126,22 @@ static GMutableSpan ensure_point_attribute(PointCloudComponent &points,
const AttributeIDRef &attribute_id,
const eCustomDataType data_type)
{
return points.attributes_for_write()
->lookup_or_add_for_write(attribute_id, ATTR_DOMAIN_POINT, data_type)
.varray.get_internal_span();
GAttributeWriter attribute = points.attributes_for_write()->lookup_or_add_for_write(
attribute_id, ATTR_DOMAIN_POINT, data_type);
GMutableSpan span = attribute.varray.get_internal_span();
attribute.finish();
return span;
}
template<typename T>
static MutableSpan<T> ensure_point_attribute(PointCloudComponent &points,
const AttributeIDRef &attribute_id)
{
return points.attributes_for_write()
->lookup_or_add_for_write<T>(attribute_id, ATTR_DOMAIN_POINT)
.varray.get_internal_span();
AttributeWriter<T> attribute = points.attributes_for_write()->lookup_or_add_for_write<T>(
attribute_id, ATTR_DOMAIN_POINT);
MutableSpan<T> span = attribute.varray.get_internal_span();
attribute.finish();
return span;
}
namespace {