Curves: fix incorrect brackets in assert.

The conditional should be a single expression.
This commit is contained in:
Lukas Tönne 2024-02-05 15:20:34 +01:00
parent b37ee403b2
commit 76e877eaf9
1 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,8 @@ template<typename T>
void accumulate_lengths(const Span<T> values, const bool cyclic, MutableSpan<float> lengths)
{
/* For cyclic curves with a single point the lengths array is empty. */
BLI_assert(
lengths.size() == (cyclic && values.size() <= 1) ? 0 : segments_num(values.size(), cyclic));
BLI_assert(lengths.size() ==
(cyclic && values.size() <= 1 ? 0 : segments_num(values.size(), cyclic)));
float length = 0.0f;
for (const int i : IndexRange(values.size() - 1)) {
length += math::distance(values[i], values[i + 1]);