compositor: fix incorrect cast, use lambda capture instead (#9161)
This commit is contained in:
parent
d8f79d7678
commit
1815f9a2e5
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue