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
path: root/source
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
parent7ef3a1a6e6e7495c94076c2dea332aa40ec09db1 (diff)
Cleanup: Typo, improve variable names
`accumulate_counts_to_offsets` wasn't just used for the point domain.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_attribute_math.hh2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc10
2 files changed, 6 insertions, 6 deletions
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<T, void>) {
- /* 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<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;
}