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]
This commit is contained in:
Filip Sykala - NTB T15p 2023-01-26 17:12:45 +01:00
parent eebf9b5a95
commit da2dc782ff
2 changed files with 4 additions and 6 deletions

View file

@ -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
}

View file

@ -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();
}