From f12904e641ae6dbdce4555c0c583cb7fbe9c5b06 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 28 Feb 2026 18:53:36 +0000 Subject: layout/algo: fix swar on removing a target (#13427) ref https://github.com/hyprwm/Hyprland/discussions/13422 --- src/layout/algorithm/Algorithm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/layout/algorithm') diff --git a/src/layout/algorithm/Algorithm.cpp b/src/layout/algorithm/Algorithm.cpp index cd8cfac4..a5f7ffcc 100644 --- a/src/layout/algorithm/Algorithm.cpp +++ b/src/layout/algorithm/Algorithm.cpp @@ -42,16 +42,16 @@ void CAlgorithm::removeTarget(SP target) { const bool IS_FLOATING = std::ranges::contains(m_floatingTargets, target); if (IS_FLOATING) { - m_floating->removeTarget(target); std::erase(m_floatingTargets, target); + m_floating->removeTarget(target); return; } const bool IS_TILED = std::ranges::contains(m_tiledTargets, target); if (IS_TILED) { - m_tiled->removeTarget(target); std::erase(m_tiledTargets, target); + m_tiled->removeTarget(target); return; } -- cgit v1.2.3