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:
authorCampbell Barton <ideasman42@gmail.com>2021-11-08 08:54:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-11-08 09:00:36 +0300
commitc3f5fca8a2b8438d9342c3efef83a940dd9c83b1 (patch)
tree919ce60b550534b1a9b0c2d20ef034acd0f4277b /source/blender/modifiers
parentde581a2302297c5e235cd6dfc51760ac7225827c (diff)
Cleanup: avoid error prone struct declarations in C++
Reference struct members by name instead relying on their order. This also simplifies moving back to named members when all compilers we use support them.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean.cc b/source/blender/modifiers/intern/MOD_boolean.cc
index 95167b5c82e..16c0e98c8d5 100644
--- a/source/blender/modifiers/intern/MOD_boolean.cc
+++ b/source/blender/modifiers/intern/MOD_boolean.cc
@@ -245,12 +245,12 @@ static BMesh *BMD_mesh_bm_create(
const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(mesh, mesh_operand_ob);
- BMeshCreateParams bmcp = {false};
- BMesh *bm = BM_mesh_create(&allocsize, &bmcp);
+ BMeshCreateParams bmesh_create_params{};
+ BMesh *bm = BM_mesh_create(&allocsize, &bmesh_create_params);
- BMeshFromMeshParams params{};
- params.calc_face_normal = true;
- BM_mesh_bm_from_me(bm, mesh_operand_ob, &params);
+ BMeshFromMeshParams bmesh_from_mesh_params{};
+ bmesh_from_mesh_params.calc_face_normal = true;
+ BM_mesh_bm_from_me(bm, mesh_operand_ob, &bmesh_from_mesh_params);
if (UNLIKELY(*r_is_flip)) {
const int cd_loop_mdisp_offset = CustomData_get_offset(&bm->ldata, CD_MDISPS);
@@ -261,7 +261,7 @@ static BMesh *BMD_mesh_bm_create(
}
}
- BM_mesh_bm_from_me(bm, mesh, &params);
+ BM_mesh_bm_from_me(bm, mesh, &bmesh_from_mesh_params);
return bm;
}
@@ -535,9 +535,9 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
BMD_mesh_intersection(bm, md, ctx, mesh_operand_ob, object, operand_ob, is_flip);
/* Needed for multiple objects to work. */
- BMeshToMeshParams params{};
- params.calc_object_remap = false;
- BM_mesh_bm_to_me(nullptr, bm, mesh, &params);
+ BMeshToMeshParams bmesh_to_mesh_params{};
+ bmesh_to_mesh_params.calc_object_remap = false;
+ BM_mesh_bm_to_me(nullptr, bm, mesh, &bmesh_to_mesh_params);
result = BKE_mesh_from_bmesh_for_eval_nomain(bm, nullptr, mesh);
BM_mesh_free(bm);