diff --git a/libsrc/geom2d/csg2d.cpp b/libsrc/geom2d/csg2d.cpp index ad497ff3..1f323193 100644 --- a/libsrc/geom2d/csg2d.cpp +++ b/libsrc/geom2d/csg2d.cpp @@ -1328,14 +1328,10 @@ Solid2d :: Solid2d(const Array, EdgeInfo>> & points, strin Loop l; for (auto & v : points) { - if(std::holds_alternative>(v)) - { - l.Append(std::get<0>(v), true); - } - if(std::holds_alternative(v)) - { - l.first->prev->info.Assign( std::get<1>(v) ); - } + if(auto point = std::get_if>(&v)) + l.Append(*point, true); + if(auto edge_info = std::get_if(&v)) + l.first->prev->info.Assign( *edge_info ); } for(auto v : l.Vertices(ALL))