Cleanup: GPv3: Use foreach_range

Instead of using `to_ranges` and then iterating, we just iterate over
the ranges directly.
This commit is contained in:
Falk David
2023-12-05 16:27:48 +01:00
parent d63b68b01b
commit 0fd851bd4b

View File

@@ -277,8 +277,7 @@ static void smooth_curve_attribute(const OffsetIndices<int> points_by_curve,
return;
}
Vector<IndexRange> selection_ranges = selection_mask.to_ranges();
for (const IndexRange range : selection_ranges) {
selection_mask.foreach_range([&](const IndexRange range) {
GMutableSpan dst_data = data.slice(range);
orig_data.resize(dst_data.size_in_bytes());
@@ -287,7 +286,7 @@ static void smooth_curve_attribute(const OffsetIndices<int> points_by_curve,
gaussian_blur_1D(
src_data, iterations, influence, smooth_ends, keep_shape, cyclic[curve_i], dst_data);
}
});
});
}