[Bf-blender-cvs] [67cb4fdbdc5] geometry-nodes: Cleanup: Don't use unsupported struct initialization

Hans Goudey noreply at git.blender.org
Thu Oct 29 21:48:44 CET 2020


Commit: 67cb4fdbdc5eb14833b78a488f3b6a67b660cca1
Author: Hans Goudey
Date:   Thu Oct 29 15:48:38 2020 -0500
Branches: geometry-nodes
https://developer.blender.org/rB67cb4fdbdc5eb14833b78a488f3b6a67b660cca1

Cleanup: Don't use unsupported struct initialization

Although this worked for me, it appears this isn't supported until C++20.

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_edge_split.cc

===================================================================

diff --git a/source/blender/nodes/geometry/nodes/node_geo_edge_split.cc b/source/blender/nodes/geometry/nodes/node_geo_edge_split.cc
index caedf78df6f..7d668ef3bfd 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_edge_split.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_edge_split.cc
@@ -56,7 +56,9 @@ static void geo_edge_split_exec(bNode *UNUSED(node), GeoNodeInputs inputs, GeoNo
     const bool use_sharp_flag = inputs.extract<bool>("Sharp Edges");
 
     /* Use modifier struct to pass arguments to the modifier code. */
-    EdgeSplitModifierData emd = {.split_angle = split_angle, .flags = MOD_EDGESPLIT_FROMANGLE};
+    EdgeSplitModifierData emd = {0};
+    emd.split_angle = split_angle;
+    emd.flags = MOD_EDGESPLIT_FROMANGLE;
     if (use_sharp_flag) {
       emd.flags |= MOD_EDGESPLIT_FROMFLAG;
     }



More information about the Bf-blender-cvs mailing list