1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:27:34 +00:00

LibJS: Replace JS::Intl::PluralRules::Type with Unicode::PluralForm

The JS::Intl enum was added when implementing the PluralRules
constructor. Now that LibUnicode has a plural rules implementation,
replace the JS::Intl enum with the analagous Unicode enum.
This commit is contained in:
Timothy Flynn 2022-07-07 09:58:36 -04:00 committed by Linus Groh
parent 2982aa0373
commit 670bd066a5
2 changed files with 5 additions and 32 deletions

View file

@ -14,27 +14,4 @@ PluralRules::PluralRules(Object& prototype)
{
}
void PluralRules::set_type(StringView type)
{
if (type == "cardinal"sv) {
m_type = Type::Cardinal;
} else if (type == "ordinal"sv) {
m_type = Type::Ordinal;
} else {
VERIFY_NOT_REACHED();
}
}
StringView PluralRules::type_string() const
{
switch (m_type) {
case Type::Cardinal:
return "cardinal"sv;
case Type::Ordinal:
return "ordinal"sv;
default:
VERIFY_NOT_REACHED();
}
}
}