mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibJS+LibUnicode: Remove unnecessary locale currency mapping wrapper
Before LibUnicode generated methods were weakly linked, we had a public method (get_locale_currency_mapping) for retrieving currency mappings. That method invoked one of several style-specific methods that only existed in the generated UnicodeLocale. One caveat of weakly linked functions is that every such function must have a public declaration. The result is that each of those styled methods are declared publicly, which makes the wrapper redundant because it is just as easy to invoke the method for the desired style.
This commit is contained in:
parent
0d75949827
commit
8126cb2545
Notes:
sideshowbarker
2024-07-17 22:01:16 +09:00
Author: https://github.com/trflynn89
Commit: 8126cb2545
Pull-request: https://github.com/SerenityOS/serenity/pull/11847
4 changed files with 7 additions and 25 deletions
|
@ -762,23 +762,6 @@ Optional<StringView> __attribute__((weak)) get_locale_calendar_mapping(StringVie
|
|||
Optional<StringView> __attribute__((weak)) get_locale_long_date_field_mapping(StringView, StringView) { return {}; }
|
||||
Optional<StringView> __attribute__((weak)) get_locale_short_date_field_mapping(StringView, StringView) { return {}; }
|
||||
Optional<StringView> __attribute__((weak)) get_locale_narrow_date_field_mapping(StringView, StringView) { return {}; }
|
||||
|
||||
Optional<StringView> get_locale_currency_mapping(StringView locale, StringView currency, Style style)
|
||||
{
|
||||
switch (style) {
|
||||
case Style::Long:
|
||||
return get_locale_long_currency_mapping(locale, currency);
|
||||
case Style::Short:
|
||||
return get_locale_short_currency_mapping(locale, currency);
|
||||
case Style::Narrow:
|
||||
return get_locale_narrow_currency_mapping(locale, currency);
|
||||
case Style::Numeric:
|
||||
return get_locale_numeric_currency_mapping(locale, currency);
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
||||
Optional<StringView> __attribute__((weak)) get_locale_key_mapping(StringView, StringView) { return {}; }
|
||||
|
||||
Vector<StringView> get_locale_key_mapping_list(StringView locale, StringView keyword)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue