Avoid implicit "this" capture in a lambda to avoid C++20 warning

Implicitly capturing "this" is deprecated in C++20, so do it explicitly,
even if it also requires explicitly capturing everything else as
combining implicit capture with explicitly capturing "this" is not
allowed in the previous C++ versions.
This commit is contained in:
Vadim Zeitlin 2024-02-13 01:31:07 +01:00
parent 4261e1d07d
commit acee397e4c

View file

@ -3054,7 +3054,7 @@ void wxAuiManager::ShowHint(const wxRect& rect)
const unsigned char b = hintCol.GetBlue();
const unsigned char a = m_hintFadeAmt;
const auto makeBrush = [=]()
const auto makeBrush = [this, r, g, b, a]()
{
return (m_flags & wxAUI_MGR_VENETIAN_BLINDS_HINT) != 0
? wxCreateVenetianBlindsBitmap(r, g, b, a)