mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
AK: Add nodiscard
attribute to AnyOf functions
This commit is contained in:
parent
318bee03d8
commit
49042bffe9
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/ldm5180 Commit: https://github.com/SerenityOS/serenity/commit/49042bffe9 Pull-request: https://github.com/SerenityOS/serenity/pull/14395 Reviewed-by: https://github.com/linusg
@ -13,7 +13,7 @@
|
|||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
template<typename TEndIterator, IteratorPairWith<TEndIterator> TIterator>
|
template<typename TEndIterator, IteratorPairWith<TEndIterator> TIterator>
|
||||||
constexpr bool any_of(
|
[[nodiscard]] constexpr bool any_of(
|
||||||
TIterator const& begin,
|
TIterator const& begin,
|
||||||
TEndIterator const& end,
|
TEndIterator const& end,
|
||||||
auto const& predicate)
|
auto const& predicate)
|
||||||
@ -22,7 +22,7 @@ constexpr bool any_of(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<IterableContainer Container>
|
template<IterableContainer Container>
|
||||||
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);
|
return any_of(container.begin(), container.end(), predicate);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user