fixes compiler warnings (#9619)

* compiler warnings: adds SYSTEM to [target_]include_directories to skip warnings originating from dependencies

* compiler warnings: uninitialized/unused variables, missing parenthesis, pragma

* compiler warnings: redundant template type, missing curly braces, pass 0 instead of NULL as int argument

* compiler warnings: removes fclose(fp) where fp==nullptr since fclose() has attribute __nonnull((1))

* compiler warnings: uninitialized variables, missing parentheses, missing curly braces

* compiler warnings: ? as lower precedence than <<

* compiler warnings: unused variable

* compiler warnings: unused result

* compiler warnings: undefined/unused variable

* compiler warnings: uninitialized variable
This commit is contained in:
Dipl.-Ing. Raoul Rubien, BSc
2025-06-14 15:05:25 +02:00
committed by GitHub
parent 9569841091
commit 3ecca6116d
38 changed files with 90 additions and 92 deletions

View File

@@ -3511,7 +3511,7 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
m_dirty = true;
#endif
} else if ((evt.ShiftDown() && evt.ControlDown() && keyCode == WXK_RETURN) ||
evt.ShiftDown() && evt.AltDown() && keyCode == WXK_RETURN) {
(evt.ShiftDown() && evt.AltDown() && keyCode == WXK_RETURN)) {
wxGetApp().plater()->toggle_show_wireframe();
m_dirty = true;
}
@@ -6640,8 +6640,8 @@ bool GLCanvas3D::_init_assemble_view_toolbar()
item.left.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLVIEWTOOLBAR_ASSEMBLE)); };
item.left.render_callback = GLToolbarItem::Default_Render_Callback;
item.visible = true;
item.visibility_callback = [this]()->bool { return true; };
item.enabling_callback = [this]()->bool {
item.visibility_callback = []()->bool { return true; };
item.enabling_callback = []()->bool {
return wxGetApp().plater()->has_assmeble_view();
};
if (!m_assemble_view_toolbar.add_item(item))
@@ -6690,7 +6690,7 @@ bool GLCanvas3D::_init_separator_toolbar()
sperate_item.name = "start_seperator";
sperate_item.icon_filename = "seperator.svg";
sperate_item.sprite_id = 0;
sperate_item.left.action_callback = [this]() {};
sperate_item.left.action_callback = []() {};
sperate_item.visibility_callback = []()->bool { return true; };
sperate_item.enabling_callback = []()->bool { return false; };
if (!m_separator_toolbar.add_item(sperate_item))
@@ -7407,7 +7407,7 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
}*/
const Camera& camera = wxGetApp().plater()->get_camera();
//BBS:add assemble view related logic
m_volumes.render(type, false, camera.get_view_matrix(), camera.get_projection_matrix(), cvn_size, [this, canvas_type](const GLVolume& volume) {
m_volumes.render(type, false, camera.get_view_matrix(), camera.get_projection_matrix(), cvn_size, [canvas_type](const GLVolume& volume) {
if (canvas_type == ECanvasType::CanvasAssembleView) {
return !volume.is_modifier;
}
@@ -7783,7 +7783,7 @@ void GLCanvas3D::_render_gizmos_overlay()
// m_gizmos.set_overlay_scale(wxGetApp().em_unit()*0.1f);
const float size = int(GLGizmosManager::Default_Icons_Size * wxGetApp().toolbar_icon_scale());
m_gizmos.set_overlay_icon_size(size); //! #ys_FIXME_experiment
#endif /* __WXMSW__ */
#endif */ /* __WXMSW__ */
m_gizmos.render_overlay();
if (m_gizmo_highlighter.m_render_arrow)
@@ -8474,7 +8474,7 @@ float GLCanvas3D::_show_assembly_tooltip_information(float caption_max, float x,
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip2(ImVec2(x, y));
auto draw_text_with_caption = [this, &imgui, & caption_max](const wxString &caption, const wxString &text) {
auto draw_text_with_caption = [&imgui, & caption_max](const wxString &caption, const wxString &text) {
imgui->text_colored(ImGuiWrapper::COL_ACTIVE, caption);
ImGui::SameLine(caption_max);
imgui->text_colored(ImGuiWrapper::COL_WINDOW_BG, text);