From 397774d42272fff8dbc6d8d53616d79667d6608a Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Tue, 4 Jun 2024 22:19:15 +0200 Subject: [PATCH] Everywhere: Remove usages of `template` keyword with no parameter list These were made invalid with P1787, and Clang (19) trunk started warning on them with https://github.com/llvm/llvm-project/pull/80801. --- AK/HashMap.h | 2 +- AK/Variant.h | 2 +- Userland/Libraries/LibIPC/Decoder.h | 2 +- Userland/Libraries/LibRegex/RegexMatcher.cpp | 2 +- Userland/Libraries/LibWeb/DOM/Node.h | 2 +- Userland/Libraries/LibWeb/TreeNode.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/AK/HashMap.h b/AK/HashMap.h index 8f25ac2c251..1c8eb810932 100644 --- a/AK/HashMap.h +++ b/AK/HashMap.h @@ -88,7 +88,7 @@ public: template bool remove_all_matching(TUnaryPredicate const& predicate) { - return m_table.template remove_all_matching([&](auto& entry) { + return m_table.remove_all_matching([&](auto& entry) { return predicate(entry.key, entry.value); }); } diff --git a/AK/Variant.h b/AK/Variant.h index 0c4fdbb120f..885f89570ea 100644 --- a/AK/Variant.h +++ b/AK/Variant.h @@ -450,7 +450,7 @@ public: decltype(auto) downcast() const& { if constexpr (sizeof...(NewTs) == 1 && (IsSpecializationOf && ...)) { - return (*this).template downcast_variant(TypeWrapper {}); + return (*this).downcast_variant(TypeWrapper {}); } else { Variant instance { Variant::invalid_index, Detail::VariantConstructTag {} }; visit([&](auto const& value) { diff --git a/Userland/Libraries/LibIPC/Decoder.h b/Userland/Libraries/LibIPC/Decoder.h index a32481de206..b205e34ed85 100644 --- a/Userland/Libraries/LibIPC/Decoder.h +++ b/Userland/Libraries/LibIPC/Decoder.h @@ -132,7 +132,7 @@ ErrorOr decode(Decoder& decoder) for (size_t i = 0; i < size; ++i) { auto value = TRY(decoder.decode()); - vector.template unchecked_append(move(value)); + vector.unchecked_append(move(value)); } return vector; diff --git a/Userland/Libraries/LibRegex/RegexMatcher.cpp b/Userland/Libraries/LibRegex/RegexMatcher.cpp index e14d04bfecb..df496bcb444 100644 --- a/Userland/Libraries/LibRegex/RegexMatcher.cpp +++ b/Userland/Libraries/LibRegex/RegexMatcher.cpp @@ -326,7 +326,7 @@ RegexResult Matcher::match(Vector const& views, Optiona matches.resize(m_pattern->parser_result.capture_groups_count + 1); if (!input.regex_options.has_flag_set(AllFlags::SkipTrimEmptyMatches)) { for (auto& matches : result.capture_group_matches) - matches.template remove_all_matching([](auto& match) { return match.view.is_null(); }); + matches.remove_all_matching([](auto& match) { return match.view.is_null(); }); } } else { result.capture_group_matches.clear_with_capacity(); diff --git a/Userland/Libraries/LibWeb/DOM/Node.h b/Userland/Libraries/LibWeb/DOM/Node.h index 8342e933d8e..f9079514525 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.h +++ b/Userland/Libraries/LibWeb/DOM/Node.h @@ -555,7 +555,7 @@ public: template void for_each_child(Callback callback) const { - return const_cast(this)->template for_each_child(move(callback)); + return const_cast(this)->for_each_child(move(callback)); } template diff --git a/Userland/Libraries/LibWeb/TreeNode.h b/Userland/Libraries/LibWeb/TreeNode.h index fc4cc45297f..cc0088a8bc6 100644 --- a/Userland/Libraries/LibWeb/TreeNode.h +++ b/Userland/Libraries/LibWeb/TreeNode.h @@ -219,7 +219,7 @@ public: template void for_each_child(Callback callback) const { - return const_cast(this)->template for_each_child(move(callback)); + return const_cast(this)->for_each_child(move(callback)); } template