AK: Convert AnyOf/AllOf to east-const style

This commit is contained in:
Ali Mohammad Pur 2021-07-22 19:13:56 +04:30 committed by Andreas Kling
parent d40d10aae7
commit 2dc31c503e
Notes: sideshowbarker 2024-07-18 08:31:58 +09:00
2 changed files with 6 additions and 6 deletions

View file

@ -13,9 +13,9 @@ namespace AK {
template<typename Container, typename ValueType>
constexpr bool all_of(
const SimpleIterator<Container, ValueType>& begin,
const SimpleIterator<Container, ValueType>& end,
const auto& predicate)
SimpleIterator<Container, ValueType> const& begin,
SimpleIterator<Container, ValueType> const& end,
auto const& predicate)
{
for (auto iter = begin; iter != end; ++iter) {
if (!predicate(*iter)) {

View file

@ -14,9 +14,9 @@ namespace AK {
template<typename Container, typename ValueType>
constexpr bool any_of(
const SimpleIterator<Container, ValueType>& begin,
const SimpleIterator<Container, ValueType>& end,
const auto& predicate)
SimpleIterator<Container, ValueType> const& begin,
SimpleIterator<Container, ValueType> const& end,
auto const& predicate)
{
return find_if(begin, end, predicate) != end;
}