From 49042bffe9d728da821deca5e1f44f83da6635f5 Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Sun, 26 Jun 2022 10:19:34 -0600 Subject: [PATCH] AK: Add `nodiscard` attribute to AnyOf functions --- AK/AnyOf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/AnyOf.h b/AK/AnyOf.h index 5d851a97fe9..fabc0efc972 100644 --- a/AK/AnyOf.h +++ b/AK/AnyOf.h @@ -13,7 +13,7 @@ namespace AK { template TIterator> -constexpr bool any_of( +[[nodiscard]] constexpr bool any_of( TIterator const& begin, TEndIterator const& end, auto const& predicate) @@ -22,7 +22,7 @@ constexpr bool any_of( } template -constexpr bool any_of(Container&& container, auto const& predicate) +[[nodiscard]] constexpr bool any_of(Container&& container, auto const& predicate) { return any_of(container.begin(), container.end(), predicate); }