From d291bb397bf60fd3cdc041a37477831cc5b3e5e0 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Sun, 20 Jun 2021 16:39:10 +0200 Subject: [PATCH] Fixed compiler warnings --- src/libslic3r/TriangleMeshSlicer.cpp | 2 +- src/libslic3r/TriangleSelector.cpp | 3 ++- src/slic3r/GUI/3DScene.hpp | 2 -- src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/TriangleMeshSlicer.cpp b/src/libslic3r/TriangleMeshSlicer.cpp index 7779278fd..04481da7e 100644 --- a/src/libslic3r/TriangleMeshSlicer.cpp +++ b/src/libslic3r/TriangleMeshSlicer.cpp @@ -405,7 +405,7 @@ void slice_facet_with_slabs( assert(min_layer == zs.end() ? max_layer == zs.end() : *min_layer >= min_z); assert(max_layer == zs.end() || *max_layer > max_z); - auto emit_slab_edge = [&lines, &lines_mutex, num_edges](IntersectionLine il, size_t slab_id, bool reverse) { + auto emit_slab_edge = [&lines, &lines_mutex](IntersectionLine il, size_t slab_id, bool reverse) { if (reverse) il.reverse(); boost::lock_guard l(lines_mutex[(slab_id + 32) >> 6]); diff --git a/src/libslic3r/TriangleSelector.cpp b/src/libslic3r/TriangleSelector.cpp index 24fac0b7b..b24a97506 100644 --- a/src/libslic3r/TriangleSelector.cpp +++ b/src/libslic3r/TriangleSelector.cpp @@ -1224,7 +1224,8 @@ bool TriangleSelector::has_facets(const std::pair parents_children; parents_children.reserve(64); - for (auto [triangle_id, ibit] : data.first) { + for (const std::pair &triangle_id_and_ibit : data.first) { + int ibit = triangle_id_and_ibit.second; assert(ibit < data.second.size()); auto next_nibble = [&data, &ibit = ibit]() { int n = 0; diff --git a/src/slic3r/GUI/3DScene.hpp b/src/slic3r/GUI/3DScene.hpp index c06fc598b..ef4940a0d 100644 --- a/src/slic3r/GUI/3DScene.hpp +++ b/src/slic3r/GUI/3DScene.hpp @@ -202,8 +202,6 @@ public: vertices_and_normals_interleaved_size = 0; triangle_indices_size = 0; quad_indices_size = 0; - static const float min = std::numeric_limits::lowest(); - static const float max = std::numeric_limits::max(); m_bounding_box.setEmpty(); } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp index 201a16618..034707a21 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp @@ -458,7 +458,7 @@ void TriangleSelectorMmuGui::render(ImGuiWrapper *imgui) GLIndexedVertexArray *iva = nullptr; if (tr.is_selected_by_seed_fill()) iva = &m_iva_seed_fill; - else if (int color = int(tr.get_state()); color < m_iva_colors.size()) + else if (int color = int(tr.get_state()); color < int(m_iva_colors.size())) iva = &m_iva_colors[color]; if (iva) { if (iva->vertices_and_normals_interleaved.size() + 18 > iva->vertices_and_normals_interleaved.capacity())