mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
Let's make it clear that these functions deal with ASCII case only.
This commit is contained in:
parent
03cc45e5a2
commit
a504ac3e2a
76 changed files with 480 additions and 476 deletions
|
@ -28,13 +28,13 @@ StringView role_name(Role role)
|
|||
Optional<Role> role_from_string(StringView role_name)
|
||||
{
|
||||
// Note: "switch" is mapped to Role::switch_ (due to C++ keyword clash)
|
||||
#define __ENUMERATE_ARIA_ROLE(name) \
|
||||
if constexpr (Role::name == Role::switch_) { \
|
||||
if (role_name.equals_ignoring_case("switch"sv)) \
|
||||
return Role::switch_; \
|
||||
} else { \
|
||||
if (role_name.equals_ignoring_case(#name##sv)) \
|
||||
return Role::name; \
|
||||
#define __ENUMERATE_ARIA_ROLE(name) \
|
||||
if constexpr (Role::name == Role::switch_) { \
|
||||
if (role_name.equals_ignoring_ascii_case("switch"sv)) \
|
||||
return Role::switch_; \
|
||||
} else { \
|
||||
if (role_name.equals_ignoring_ascii_case(#name##sv)) \
|
||||
return Role::name; \
|
||||
}
|
||||
ENUMERATE_ARIA_ROLES
|
||||
#undef __ENUMERATE_ARIA_ROLE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue