1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

LibWeb: Remove two lowercase string creations from Element::has_class

This commit is contained in:
Timothy Flynn 2021-10-28 09:03:06 -04:00 committed by Andreas Kling
parent 7f223e2290
commit 691e4820ac

View file

@ -114,7 +114,7 @@ bool Element::has_class(const FlyString& class_name, CaseSensitivity case_sensit
return any_of(m_classes, [&](auto& it) {
return case_sensitivity == CaseSensitivity::CaseSensitive
? it == class_name
: it.to_lowercase() == class_name.to_lowercase();
: it.equals_ignoring_case(class_name);
});
}