From 98395e0bdfc849e2d2770052c6e8651a42500608 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 22 Jul 2022 10:49:09 -0500 Subject: Cleanup: Use r_ prefix for boolean return parameters Also rearrange some lines to simplify logic. --- source/blender/io/alembic/intern/abc_reader_object.cc | 6 +++--- source/blender/modifiers/intern/MOD_nodes.cc | 6 +++--- .../nodes/geometry/nodes/node_geo_store_named_attribute.cc | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'source') diff --git a/source/blender/io/alembic/intern/abc_reader_object.cc b/source/blender/io/alembic/intern/abc_reader_object.cc index a698eeca8f1..db056c0eef6 100644 --- a/source/blender/io/alembic/intern/abc_reader_object.cc +++ b/source/blender/io/alembic/intern/abc_reader_object.cc @@ -218,12 +218,12 @@ Alembic::AbcGeom::IXform AbcObjectReader::xform() void AbcObjectReader::read_matrix(float r_mat[4][4] /* local matrix */, const chrono_t time, const float scale, - bool &is_constant) + bool &r_is_constant) { IXform ixform = xform(); if (!ixform) { unit_m4(r_mat); - is_constant = true; + r_is_constant = true; return; } @@ -254,7 +254,7 @@ void AbcObjectReader::read_matrix(float r_mat[4][4] /* local matrix */, mul_m4_m4m4(r_mat, scale_mat, r_mat); } - is_constant = schema.isConstant(); + r_is_constant = schema.isConstant(); } void AbcObjectReader::addCacheModifier() diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 01e4d5ff6b3..223e4b757b7 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -200,7 +200,7 @@ static bool node_needs_own_transform_relation(const bNode &node) static void process_nodes_for_depsgraph(const bNodeTree &tree, Set &ids, - bool &needs_own_transform_relation) + bool &r_needs_own_transform_relation) { Set handled_groups; @@ -211,10 +211,10 @@ static void process_nodes_for_depsgraph(const bNodeTree &tree, if (ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP)) { const bNodeTree *group = (bNodeTree *)node->id; if (group != nullptr && handled_groups.add(group)) { - process_nodes_for_depsgraph(*group, ids, needs_own_transform_relation); + process_nodes_for_depsgraph(*group, ids, r_needs_own_transform_relation); } } - needs_own_transform_relation |= node_needs_own_transform_relation(*node); + r_needs_own_transform_relation |= node_needs_own_transform_relation(*node); } } diff --git a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc index 2a784430683..dbd68f4c783 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc @@ -90,13 +90,13 @@ static void try_capture_field_on_geometry(GeometryComponent &component, const StringRef name, const eAttrDomain domain, const GField &field, - std::atomic &failure) + std::atomic &r_failure) { - const int domain_size = component.attribute_domain_size(domain); + MutableAttributeAccessor attributes = *component.attributes_for_write(); + const int domain_size = attributes.domain_size(domain); if (domain_size == 0) { return; } - MutableAttributeAccessor attributes = *component.attributes_for_write(); GeometryComponentFieldContext field_context{component, domain}; const IndexMask mask{IndexMask(domain_size)}; @@ -133,7 +133,7 @@ static void try_capture_field_on_geometry(GeometryComponent &component, * it's required, and adding the attribute might fail if the domain or type is incorrect. */ type.destruct_n(buffer, domain_size); MEM_freeN(buffer); - failure = true; + r_failure = true; } static void node_geo_exec(GeoNodeExecParams params) -- cgit v1.2.3