Cleanup: Remove unnecessary check

fd92647f added an early return so now this check is no longer needed.
This commit is contained in:
Falk David 2024-03-12 11:25:43 +01:00
parent 24f7074c6c
commit 6a016ce255

@ -266,7 +266,7 @@ static MutableSpan<T> get_mutable_attribute(CurvesGeometry &curves,
const T default_value = T())
{
const int num = domain_num(curves, domain);
if (num == 0) {
if (num <= 0) {
return {};
}
const eCustomDataType type = cpp_type_to_custom_data_type(CPPType::get<T>());
@ -278,7 +278,7 @@ static MutableSpan<T> get_mutable_attribute(CurvesGeometry &curves,
}
data = (T *)CustomData_add_layer_named(&custom_data, type, CD_SET_DEFAULT, num, name);
MutableSpan<T> span = {data, num};
if (num > 0 && span.first() != default_value) {
if (span.first() != default_value) {
span.fill(default_value);
}
return span;