diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-11-08 08:54:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-11-08 09:00:36 +0300 |
commit | c3f5fca8a2b8438d9342c3efef83a940dd9c83b1 (patch) | |
tree | 919ce60b550534b1a9b0c2d20ef034acd0f4277b /source/blender/io/collada/collada_utils.cpp | |
parent | de581a2302297c5e235cd6dfc51760ac7225827c (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/io/collada/collada_utils.cpp')
-rw-r--r-- | source/blender/io/collada/collada_utils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/io/collada/collada_utils.cpp b/source/blender/io/collada/collada_utils.cpp index 60c4a9bad13..c1f25ea9a26 100644 --- a/source/blender/io/collada/collada_utils.cpp +++ b/source/blender/io/collada/collada_utils.cpp @@ -444,14 +444,14 @@ void bc_triangulate_mesh(Mesh *me) /* XXX: The triangulation method selection could be offered in the UI. */ int quad_method = MOD_TRIANGULATE_QUAD_SHORTEDGE; - const struct BMeshCreateParams bm_create_params = {0}; + const BMeshCreateParams bm_create_params{}; BMesh *bm = BM_mesh_create(&bm_mesh_allocsize_default, &bm_create_params); - BMeshFromMeshParams bm_from_me_params = {0}; + BMeshFromMeshParams bm_from_me_params{}; bm_from_me_params.calc_face_normal = true; BM_mesh_bm_from_me(bm, me, &bm_from_me_params); BM_mesh_triangulate(bm, quad_method, use_beauty, 4, tag_only, nullptr, nullptr, nullptr); - BMeshToMeshParams bm_to_me_params = {0}; + BMeshToMeshParams bm_to_me_params{}; bm_to_me_params.calc_object_remap = false; BM_mesh_bm_to_me(nullptr, bm, me, &bm_to_me_params); BM_mesh_free(bm); |