diff options
| author | heather7283 <142042427+heather7283@users.noreply.github.com> | 2025-01-25 03:26:46 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-25 00:26:46 +0100 |
| commit | 1815f9a2e5e12cafa670e0f4f7eb10dc9436868c (patch) | |
| tree | cc952818d9bc9cf058f3a099935df4b3ad02663e /src/Compositor.cpp | |
| parent | d8f79d7678f428738f3173020109bd7b7fbd0840 (diff) | |
compositor: fix incorrect cast, use lambda capture instead (#9161)
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index ab9c16f7..fa73be66 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2519,13 +2519,13 @@ PHLLS CCompositor::getLayerSurfaceFromSurface(SP<CWLSurfaceResource> pSurface) { continue; ls->layerSurface->surface->breadthfirst( - [](SP<CWLSurfaceResource> surf, const Vector2D& offset, void* data) { - if (surf == ((std::pair<SP<CWLSurfaceResource>, bool>*)data)->first) { - *(bool*)data = true; + [&result](SP<CWLSurfaceResource> surf, const Vector2D& offset, void* data) { + if (surf == result.first) { + result.second = true; return; } }, - &result); + nullptr); if (result.second) return ls; |
