Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-03-24 07:50:10 +0300
committerHans Goudey <h.goudey@me.com>2022-03-24 07:50:10 +0300
commit6d61cf4e80d03e9c05cbefa78e233a68c9fe0ca4 (patch)
treef397af62e6d177b243098a4bddd884b64b33ef70 /source/blender/nodes
parent7ef3a1a6e6e7495c94076c2dea332aa40ec09db1 (diff)
Cleanup: Typo, improve variable names
`accumulate_counts_to_offsets` wasn't just used for the point domain.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
index da4e99026c3..b85ef07e9fe 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -83,12 +83,12 @@ static Array<int> accumulate_counts_to_offsets(const IndexMask selection,
const VArray<int> &counts)
{
Array<int> offsets(selection.size() + 1);
- int dst_points_size = 0;
- for (const int i_point : selection.index_range()) {
- offsets[i_point] = dst_points_size;
- dst_points_size += std::max(counts[selection[i_point]], 0);
+ int total = 0;
+ for (const int i : selection.index_range()) {
+ offsets[i] = total;
+ total += std::max(counts[selection[i]], 0);
}
- offsets.last() = dst_points_size;
+ offsets.last() = total;
return offsets;
}