From 83e729d20ebffdd28ec0a24da88e265e7b9aba26 Mon Sep 17 00:00:00 2001 From: Clifford Date: Fri, 18 Sep 2026 10:42:31 -0400 Subject: [PATCH] fix(build): drop two unused lambda captures that break non-Release clang builds (#15749) fix(build): drop two unused lambda captures that break non-Release builds Both handlers capture this and never use it. They sit inside #if !BBL_RELEASE_TO_PUBLIC, which CMakeLists defines as $, so the code compiles in Debug and RelWithDebInfo but not in Release. Clang warns on an unused capture under -Wall, and since every warning became an error the two captures fail any clang build that is not Release - an Xcode scheme on its default Debug configuration, for instance. The CI matrix builds Release, where the block does not exist, and GCC does not implement the warning at all, so nothing in CI can see it. Co-authored-by: Claude Opus 5 (1M context) --- src/slic3r/GUI/CameraPopup.cpp | 2 +- src/slic3r/GUI/StatusPanel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/CameraPopup.cpp b/src/slic3r/GUI/CameraPopup.cpp index cc7e00eec6..c4e3c5486c 100644 --- a/src/slic3r/GUI/CameraPopup.cpp +++ b/src/slic3r/GUI/CameraPopup.cpp @@ -82,7 +82,7 @@ CameraPopup::CameraPopup(wxWindow *parent) top_sizer->Add(m_text_liveview_retry, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, FromDIP(5)); top_sizer->Add(m_switch_liveview_retry, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, FromDIP(5)); - m_switch_liveview_retry->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent &e) { + m_switch_liveview_retry->Bind(wxEVT_TOGGLEBUTTON, [](wxCommandEvent &e) { wxGetApp().app_config->set("liveview", "auto_retry", e.IsChecked()); e.Skip(); }); diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index f7bd41fe84..fb0029edc3 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -1462,7 +1462,7 @@ wxBoxSizer *StatusBasePanel::create_monitoring_page() #if !BBL_RELEASE_TO_PUBLIC m_staticText_timelapse->Show(); m_bmToggleBtn_timelapse->Show(); - m_bmToggleBtn_timelapse->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent &e) { + m_bmToggleBtn_timelapse->Bind(wxEVT_TOGGLEBUTTON, [](wxCommandEvent &e) { if (e.IsChecked()) wxGetApp().getAgent()->start_subscribe("tunnel"); else