mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
Userland: Make use of container version of any_of
Problem: - New `any_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
cb9de1d741
commit
a0d7640e03
3 changed files with 6 additions and 6 deletions
|
@ -91,7 +91,7 @@ void Element::remove_attribute(const FlyString& name)
|
|||
|
||||
bool Element::has_class(const FlyString& class_name, CaseSensitivity case_sensitivity) const
|
||||
{
|
||||
return any_of(m_classes.begin(), m_classes.end(), [&](auto& it) {
|
||||
return any_of(m_classes, [&](auto& it) {
|
||||
return case_sensitivity == CaseSensitivity::CaseSensitive
|
||||
? it == class_name
|
||||
: it.to_lowercase() == class_name.to_lowercase();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue