From 6d61cf4e80d03e9c05cbefa78e233a68c9fe0ca4 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 23 Mar 2022 23:50:10 -0500 Subject: Cleanup: Typo, improve variable names `accumulate_counts_to_offsets` wasn't just used for the point domain. --- source/blender/blenkernel/BKE_attribute_math.hh | 2 +- .../nodes/geometry/nodes/node_geo_duplicate_elements.cc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/BKE_attribute_math.hh b/source/blender/blenkernel/BKE_attribute_math.hh index 3075c0689e9..9efa64d1474 100644 --- a/source/blender/blenkernel/BKE_attribute_math.hh +++ b/source/blender/blenkernel/BKE_attribute_math.hh @@ -22,7 +22,7 @@ inline void convert_to_static_type(const CPPType &cpp_type, const Func &func) [&](auto type_tag) { using T = typename decltype(type_tag)::type; if constexpr (std::is_same_v) { - /* It's expected that the given cpp type is one of the supported once. */ + /* It's expected that the given cpp type is one of the supported ones. */ BLI_assert_unreachable(); } else { 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 accumulate_counts_to_offsets(const IndexMask selection, const VArray &counts) { Array 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; } -- cgit v1.2.3