From c69a581c0b951d219f1501a8ceb7040bdf36e51c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 24 Jan 2022 14:09:31 +1100 Subject: 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. --- source/blender/modifiers/intern/MOD_weld.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/modifiers/intern/MOD_weld.cc') 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 weld_vert_ctx_alloc_and_setup(Span 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; -- cgit v1.2.3