From 9ab132ca44a02f2d33d7891978ac3cc7204988ad Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 9 Mar 2023 09:49:55 +0100 Subject: [PATCH] Fixed warnings --- src/slic3r/GUI/3DScene.cpp | 2 +- src/slic3r/GUI/GLCanvas3D.cpp | 5 ++--- src/slic3r/GUI/Gizmos/GLGizmoScale.cpp | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index c25bff45d..7b4fee156 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -494,7 +494,7 @@ int GLVolumeCollection::load_wipe_tower_preview( height = 0.1f; static const float brim_height = 0.2f; - const float scaled_brim_height = brim_height / height; +// const float scaled_brim_height = brim_height / height; TriangleMesh mesh; ColorRGBA color = ColorRGBA::DARK_YELLOW(); diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 1b1e268f0..3ea788126 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -7137,11 +7137,10 @@ const ModelVolume *get_model_volume(const GLVolume &v, const Model &model) { const ModelVolume * ret = nullptr; - if (v.object_idx() < model.objects.size()) { + if (v.object_idx() < (int)model.objects.size()) { const ModelObject *obj = model.objects[v.object_idx()]; - if (v.volume_idx() < obj->volumes.size()) { + if (v.volume_idx() < (int)obj->volumes.size()) ret = obj->volumes[v.volume_idx()]; - } } return ret; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoScale.cpp b/src/slic3r/GUI/Gizmos/GLGizmoScale.cpp index eec764efe..332572c01 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoScale.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoScale.cpp @@ -58,7 +58,7 @@ std::string GLGizmoScale3D::get_tooltip() const static int constraint_id(int grabber_id) { static const std::vector id_map = { 1, 0, 3, 2, 5, 4, 8, 9, 6, 7 }; - return (0 <= grabber_id && grabber_id < id_map.size()) ? id_map[grabber_id] : -1; + return (0 <= grabber_id && grabber_id < (int)id_map.size()) ? id_map[grabber_id] : -1; } bool GLGizmoScale3D::on_mouse(const wxMouseEvent &mouse_event) @@ -157,8 +157,6 @@ void GLGizmoScale3D::on_dragging(const UpdateData& data) void GLGizmoScale3D::on_render() { - const Selection& selection = m_parent.get_selection(); - glsafe(::glClear(GL_DEPTH_BUFFER_BIT)); glsafe(::glEnable(GL_DEPTH_TEST));