diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-06 00:40:28 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-06 00:40:44 +0300 |
commit | bb7e3c2b563f752c0bc76631fd2804768c6d3847 (patch) | |
tree | 0b4ee9cd402d888ae56c8c48f27b2f05180b7278 /source/blender/nodes | |
parent | 228f7f1c850897cac85b2c4b42cf9052976b7be1 (diff) |
Cleanup: Simplify if statements, clang tidy
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_material_replace.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_material_replace.cc b/source/blender/nodes/geometry/nodes/node_geo_material_replace.cc index cfa1d332f85..546982b11af 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_material_replace.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_material_replace.cc @@ -28,8 +28,7 @@ static void node_geo_exec(GeoNodeExecParams params) GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"); geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - Mesh *mesh = geometry_set.get_mesh_for_write(); - if (mesh != nullptr) { + if (Mesh *mesh = geometry_set.get_mesh_for_write()) { for (const int i : IndexRange(mesh->totcol)) { if (mesh->mat[i] == old_material) { mesh->mat[i] = new_material; |