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 <campbell@blender.org>2022-01-24 06:09:31 +0300
committerCampbell Barton <campbell@blender.org>2022-01-24 06:27:16 +0300
commitc69a581c0b951d219f1501a8ceb7040bdf36e51c (patch)
tree3aec58d35355d0735d4fc54497652dfca87263ec
parentabf30007abdac2a5bf3a12c90649a42294aad660 (diff)
Cleanup: avoid positional struct initialization
When moving to C++ field for initialization was removed. Favor assignments to field names as it reads better and avoids bugs if files are ever re-arranged as well as mistakes (see T94784). Note that the generated optimized output is identical with GCC11.
-rw-r--r--source/blender/modifiers/intern/MOD_weld.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_weld.cc b/source/blender/modifiers/intern/MOD_weld.cc
index 3199bdc834f..2d4710ca71a 100644
--- a/source/blender/modifiers/intern/MOD_weld.cc
+++ b/source/blender/modifiers/intern/MOD_weld.cc
@@ -386,7 +386,10 @@ static Vector<WeldVert> weld_vert_ctx_alloc_and_setup(Span<int> vert_dest_map,
for (const int i : vert_dest_map.index_range()) {
if (vert_dest_map[i] != OUT_OF_CONTEXT) {
- wvert.append({vert_dest_map[i], i});
+ WeldVert wv{};
+ wv.vert_dest = vert_dest_map[i];
+ wv.vert_orig = i;
+ wvert.append(wv);
}
}
return wvert;