aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/desktop/Window.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-12-16 19:21:44 +0100
committerGitHub <[email protected]>2024-12-16 19:21:44 +0100
commite06b520427a30f1c86562ad7cc3794bf03b40188 (patch)
tree54cbdf6f61c22d6abc4ef16fe6a5dabdf2542b1a /src/desktop/Window.cpp
parentdab50b3ef3a1bad7f68320538223b6b41d1c6012 (diff)
downloadHyprland-e06b520427a30f1c86562ad7cc3794bf03b40188.tar.gz
Hyprland-e06b520427a30f1c86562ad7cc3794bf03b40188.zip
core: Move regex from stdlib to re2 (#8736)
Moves the regex handling from stdlib to re2
Diffstat (limited to 'src/desktop/Window.cpp')
-rw-r--r--src/desktop/Window.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index 9d4b597b..2858e931 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -1,3 +1,5 @@
+#include <re2/re2.h>
+
#include <any>
#include <bit>
#include <string_view>
@@ -1601,13 +1603,13 @@ PHLWINDOW CWindow::getSwallower() {
}
if (!(*PSWALLOWREGEX).empty())
- std::erase_if(candidates, [&](const auto& other) { return !std::regex_match(other->m_szClass, std::regex(*PSWALLOWREGEX)); });
+ std::erase_if(candidates, [&](const auto& other) { return !RE2::FullMatch(other->m_szClass, *PSWALLOWREGEX); });
if (candidates.size() <= 0)
return nullptr;
if (!(*PSWALLOWEXREGEX).empty())
- std::erase_if(candidates, [&](const auto& other) { return std::regex_match(other->m_szTitle, std::regex(*PSWALLOWEXREGEX)); });
+ std::erase_if(candidates, [&](const auto& other) { return RE2::FullMatch(other->m_szTitle, *PSWALLOWEXREGEX); });
if (candidates.size() <= 0)
return nullptr;