From 0f4a79a24d6769faa2b31474fe25e6e789f5bcf1 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Tue, 21 Dec 2021 18:08:36 +0100 Subject: [PATCH] LibRegex: Capture `this` explicitly in RegexStringView::equals lambda This stops clang-tidy from suggesting that this function can be made static, although accessing `this->operator==` in the lambda function. --- Userland/Libraries/LibRegex/RegexMatch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibRegex/RegexMatch.h b/Userland/Libraries/LibRegex/RegexMatch.h index c0b91fde4c..a274711bdc 100644 --- a/Userland/Libraries/LibRegex/RegexMatch.h +++ b/Userland/Libraries/LibRegex/RegexMatch.h @@ -376,7 +376,7 @@ public: bool equals(RegexStringView other) const { - return other.m_view.visit([&](auto const& view) { return operator==(view); }); + return other.m_view.visit([this](auto const& view) { return operator==(view); }); } bool equals_ignoring_case(RegexStringView other) const