From da2dc782ff366fda43f2083e3ad6c257fe5a88d8 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Thu, 26 Jan 2023 17:12:45 +0100 Subject: [PATCH] Fix warnings ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:766:17: warning: unused variable 'window_title' [-Wunused-variable] ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:2044:35: warning: suggest parentheses around '&&' within '||' [-Wparentheses] ../src/libslic3r/CutSurface.cpp:1626:25: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses] ../src/libslic3r/CutSurface.cpp:1627:25: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses] ../src/libslic3r/CutSurface.cpp:1628:25: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses] --- src/libslic3r/CutSurface.cpp | 6 +++--- src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/libslic3r/CutSurface.cpp b/src/libslic3r/CutSurface.cpp index c484bba228..df46ad7f44 100644 --- a/src/libslic3r/CutSurface.cpp +++ b/src/libslic3r/CutSurface.cpp @@ -1623,9 +1623,9 @@ void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh) Vec3d n1 = v_ab.cross(v_ae); Vec3d n2 = v_ab.cross(v_al); // check that normal has same direction - if ((n1.x() > 0 != n2.x() > 0) || - (n1.y() > 0 != n2.y() > 0) || - (n1.z() > 0 != n2.z() > 0)) + if (((n1.x() > 0) != (n2.x() > 0)) || + ((n1.y() > 0) != (n2.y() > 0)) || + ((n1.z() > 0) != (n2.z() > 0))) return; // this reduction will create CCW triangle } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index 62d3c9a8c9..ca45924e7a 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -762,8 +762,6 @@ void GLGizmoEmboss::on_render_input_window(float x, float y, float bottom_limit) draw_mouse_offset(m_dragging_mouse_offset); #endif // SHOW_OFFSET_DURING_DRAGGING - std::string window_title_string = on_get_name(); - const char* window_title = window_title_string.c_str(); if (m_allow_open_near_volume){ // check if is set window offset if (m_set_window_offset.has_value()) { @@ -2041,7 +2039,7 @@ void GLGizmoEmboss::draw_font_list() } if (!ImGui::IsWindowFocused() || - !is_input_text_active && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape))) { + (!is_input_text_active && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))) { // closing of popup ImGui::CloseCurrentPopup(); }