Forráskód Böngészése

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.
Hendiadyoin1 3 éve
szülő
commit
0f4a79a24d
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      Userland/Libraries/LibRegex/RegexMatch.h

+ 1 - 1
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