mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
AK: Convert AnyOf/AllOf to east-const style
This commit is contained in:
parent
d40d10aae7
commit
2dc31c503e
Notes:
sideshowbarker
2024-07-18 08:31:58 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/2dc31c503e9 Pull-request: https://github.com/SerenityOS/serenity/pull/8933
2 changed files with 6 additions and 6 deletions
|
@ -13,9 +13,9 @@ namespace AK {
|
||||||
|
|
||||||
template<typename Container, typename ValueType>
|
template<typename Container, typename ValueType>
|
||||||
constexpr bool all_of(
|
constexpr bool all_of(
|
||||||
const SimpleIterator<Container, ValueType>& begin,
|
SimpleIterator<Container, ValueType> const& begin,
|
||||||
const SimpleIterator<Container, ValueType>& end,
|
SimpleIterator<Container, ValueType> const& end,
|
||||||
const auto& predicate)
|
auto const& predicate)
|
||||||
{
|
{
|
||||||
for (auto iter = begin; iter != end; ++iter) {
|
for (auto iter = begin; iter != end; ++iter) {
|
||||||
if (!predicate(*iter)) {
|
if (!predicate(*iter)) {
|
||||||
|
|
|
@ -14,9 +14,9 @@ namespace AK {
|
||||||
|
|
||||||
template<typename Container, typename ValueType>
|
template<typename Container, typename ValueType>
|
||||||
constexpr bool any_of(
|
constexpr bool any_of(
|
||||||
const SimpleIterator<Container, ValueType>& begin,
|
SimpleIterator<Container, ValueType> const& begin,
|
||||||
const SimpleIterator<Container, ValueType>& end,
|
SimpleIterator<Container, ValueType> const& end,
|
||||||
const auto& predicate)
|
auto const& predicate)
|
||||||
{
|
{
|
||||||
return find_if(begin, end, predicate) != end;
|
return find_if(begin, end, predicate) != end;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue