diff options
author | Hans Goudey <h.goudey@me.com> | 2022-07-01 17:46:27 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-07-01 17:46:27 +0300 |
commit | d0e3388848a66eb4ca2f7e16278fabd5832e568a (patch) | |
tree | 50e09bf829ecff39a7c2643829807736d0c8ac11 /source | |
parent | da00d62c4913a71e116f74f874d7a17cfee9c14e (diff) |
Cleanup: Simplify logic building in length parameterization
We can construct an IndexRange directly rather than retrieving it.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/length_parameterize.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/length_parameterize.cc b/source/blender/blenlib/intern/length_parameterize.cc index 7c0fc860b53..e18b048e96d 100644 --- a/source/blender/blenlib/intern/length_parameterize.cc +++ b/source/blender/blenlib/intern/length_parameterize.cc @@ -47,7 +47,7 @@ void create_uniform_samples(const Span<float> lengths, const int segment_samples_num = std::ceil(next_length * step_length_inv - i_dst); indices.slice(i_dst, segment_samples_num).fill(i_src); - for (const int i : factors.index_range().slice(i_dst, segment_samples_num)) { + for (const int i : IndexRange(i_dst, segment_samples_num)) { const float length_in_segment = step_length * i - prev_length; factors[i] = length_in_segment * segment_length_inv; } |