Fix: Silence warning in BKE_brush_calc_curve_factors

Introduced in 23951e1b12

Pull Request: https://projects.blender.org/blender/blender/pulls/139977
This commit is contained in:
Sean Kim
2025-06-10 03:07:36 +02:00
committed by Sean Kim
parent 12f4e17044
commit ddcd314df4

View File

@@ -1385,9 +1385,10 @@ void BKE_brush_calc_curve_factors(const eBrushCurvePreset preset,
const blender::MutableSpan<float> factors)
{
BLI_assert(factors.size() == distances.size());
for (const int i : distances.index_range()) {
BLI_assert(distances[i] < brush_radius || factors[i] == 0.0f);
}
BLI_assert(std::all_of(
distances.index_range().begin(), distances.index_range().end(), [&](const int i) {
return distances[i] < brush_radius || factors[i] == 0.0f;
}));
const float radius_rcp = blender::math::rcp(brush_radius);
switch (preset) {