From e0b77bb4c24f283457fd0f6d7821d8a258ff711b Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Wed, 13 Jul 2022 08:45:54 +0200 Subject: [PATCH] Fix: ../src/libslic3r/CutSurface.cpp:1419:18: error: non-const lvalue reference to type 'Property_map<...>' cannot bind to a temporary of type 'Property_map<...>' ../src/libslic3r/CutSurface.cpp:2741:15: error: non-const lvalue reference to type 'Property_map<...>' cannot bind to a temporary of type 'Property_map<...>' ../src/libslic3r/CutSurface.cpp:2758:83: warning: braces around scalar initializer [-Wbraced-scalar-init] --- src/libslic3r/CutSurface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/CutSurface.cpp b/src/libslic3r/CutSurface.cpp index 0b05f3ab09..6dceb2dd86 100644 --- a/src/libslic3r/CutSurface.cpp +++ b/src/libslic3r/CutSurface.cpp @@ -1416,7 +1416,7 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model, Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid}; // a property map containing the constrained-or-not status of each edge - EdgeBoolMap &ecm = cgal_model.add_property_map(is_constrained_edge_name).first; + EdgeBoolMap ecm = cgal_model.add_property_map(is_constrained_edge_name).first; const auto &p = CGAL::parameters::visitor(visitor) .edge_is_constrained_map(ecm) .throw_on_self_intersection(false); @@ -2738,7 +2738,7 @@ priv::SurfacePatch priv::separate_patch(size_t n, patch_new.model_id = patch.model_id; patch_new.shape_id = patch.shape_id; // fix cvt - CvtVI2VI &cvt = patch_new.mesh.property_map(patch_source_name).first; + CvtVI2VI cvt = patch_new.mesh.property_map(patch_source_name).first; for (VI &vi : cvt) { if (!vi.is_valid()) continue; vi = cvt_from[vi]; @@ -2755,7 +2755,7 @@ void priv::divide_patch(size_t i, SurfacePatches &patches) { CutMesh& cm = patch.mesh; std::string patch_number_name = "f:patch_number"; - PatchNumber patch_number = cm.add_property_map(patch_number_name, {def_value}).first; + PatchNumber patch_number = cm.add_property_map(patch_number_name, def_value).first; size_t number = 0; std::vector queue;