mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 17:37:47 +00:00
Everywhere: Make use of container version of all_of
Problem: - New `all_of` implementation takes the entire container so the user does not need to pass explicit begin/end iterators. This is unused except is in tests. Solution: - Make use of the new and more user-friendly version where possible.
This commit is contained in:
parent
2c042e3530
commit
97bd13264a
10 changed files with 10 additions and 11 deletions
|
@ -199,8 +199,7 @@ private:
|
|||
return false;
|
||||
};
|
||||
auto references_all_arguments = AK::all_of(
|
||||
all_parameters.begin(),
|
||||
all_parameters.end(),
|
||||
all_parameters,
|
||||
[&](auto& entry) {
|
||||
return contains(
|
||||
check.used_arguments.begin(),
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
|
||||
constexpr bool is_zero() const
|
||||
{
|
||||
return all_of(m_data.begin(), m_data.end(), [](const auto octet) { return octet == 0; });
|
||||
return all_of(m_data, [](const auto octet) { return octet == 0; });
|
||||
}
|
||||
|
||||
void copy_to(Bytes destination) const
|
||||
|
|
|
@ -284,7 +284,7 @@ bool contains(const StringView& str, const StringView& needle, CaseSensitivity c
|
|||
|
||||
bool is_whitespace(const StringView& str)
|
||||
{
|
||||
return all_of(str.begin(), str.end(), is_ascii_space);
|
||||
return all_of(str, is_ascii_space);
|
||||
}
|
||||
|
||||
StringView trim(const StringView& str, const StringView& characters, TrimMode mode)
|
||||
|
|
|
@ -70,7 +70,7 @@ bool UUID::operator==(const UUID& other) const
|
|||
|
||||
bool UUID::is_zero() const
|
||||
{
|
||||
return all_of(m_uuid_buffer.begin(), m_uuid_buffer.end(), [](const auto octet) { return octet == 0; });
|
||||
return all_of(m_uuid_buffer, [](const auto octet) { return octet == 0; });
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue