From f77a664e9d168fb7b332ede9db4a3e35a46dd6c5 Mon Sep 17 00:00:00 2001 From: Anton Samokhvalov Date: Sun, 15 Jan 2023 19:13:29 +0300 Subject: [PATCH] Fix clang build, second version (#33) --- src/Hyprpaper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hyprpaper.cpp b/src/Hyprpaper.cpp index d895fe0..b142084 100644 --- a/src/Hyprpaper.cpp +++ b/src/Hyprpaper.cpp @@ -199,8 +199,8 @@ void CHyprpaper::ensurePoolBuffersPresent() { if (m->size == Vector2D()) continue; - auto it = std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [&](const std::unique_ptr& el) { - return el->target == wt.m_szPath && el->pixelSize == m->size * m->scale; + auto it = std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [wt = &wt, &m](const std::unique_ptr& el) { + return el->target == wt->m_szPath && el->pixelSize == m->size * m->scale; }); if (it == m_vBuffers.end()) {