From d7685a40ee2423e75072705dbd21e13752be7572 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sat, 13 Apr 2024 15:07:54 -0400 Subject: [PATCH] More lambda updates to explicit capture --- common/widgets/bitmap_button.cpp | 6 +++--- common/widgets/grid_color_swatch_helpers.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/widgets/bitmap_button.cpp b/common/widgets/bitmap_button.cpp index 65275a4b27..c8c3eac24f 100644 --- a/common/widgets/bitmap_button.cpp +++ b/common/widgets/bitmap_button.cpp @@ -196,7 +196,7 @@ void BITMAP_BUTTON::OnLeftButtonUp( wxMouseEvent& aEvent ) if( !hasFlag( wxCONTROL_DISABLED ) && ( m_acceptDraggedInClicks || hasFlag( wxCONTROL_PRESSED | wxCONTROL_FOCUSED ) ) ) { - GetEventHandler()->CallAfter( [=]() + GetEventHandler()->CallAfter( [this]() { wxCommandEvent evt( wxEVT_BUTTON, GetId() ); evt.SetEventObject( this ); @@ -220,7 +220,7 @@ void BITMAP_BUTTON::OnLeftButtonDown( wxMouseEvent& aEvent ) clearFlag( wxCONTROL_CHECKED ); GetEventHandler()->CallAfter( - [=]() + [this]() { wxCommandEvent evt( wxEVT_BUTTON, GetId() ); evt.SetEventObject( this ); @@ -233,7 +233,7 @@ void BITMAP_BUTTON::OnLeftButtonDown( wxMouseEvent& aEvent ) setFlag( wxCONTROL_CHECKED ); GetEventHandler()->CallAfter( - [=]() + [this]() { wxCommandEvent evt( wxEVT_BUTTON, GetId() ); evt.SetEventObject( this ); diff --git a/common/widgets/grid_color_swatch_helpers.cpp b/common/widgets/grid_color_swatch_helpers.cpp index 66f286b1dc..c94614cae3 100644 --- a/common/widgets/grid_color_swatch_helpers.cpp +++ b/common/widgets/grid_color_swatch_helpers.cpp @@ -160,7 +160,7 @@ void GRID_CELL_COLOR_SELECTOR::BeginEdit( int row, int col, wxGrid* grid ) m_value.SetFromWxString( grid->GetTable()->GetValue( row, col ) ); grid->CallAfter( - [=]() + [this, row, col]() { DIALOG_COLOR_PICKER dialog( m_parent, m_value, false );