mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibUnicode: Parse and generate calendar (ca) Unicode keywords
Also removes a few fly-by "StringView x = nullptr;" unnecessary initializers.
This commit is contained in:
parent
48ce72e472
commit
71903ea7e1
4 changed files with 78 additions and 13 deletions
|
@ -291,8 +291,16 @@ void generate_mapping(SourceGenerator& generator, LocalesType const& locales, St
|
|||
Vector<String> mapping_names;
|
||||
|
||||
for (auto const& locale : locales) {
|
||||
auto mapping_name = format_mapping_name(format, locale.key);
|
||||
format_list(mapping_name, locale.value);
|
||||
String mapping_name;
|
||||
|
||||
if constexpr (requires { locale.key; }) {
|
||||
mapping_name = format_mapping_name(format, locale.key);
|
||||
format_list(mapping_name, locale.value);
|
||||
} else {
|
||||
mapping_name = format_mapping_name(format, locale);
|
||||
format_list(mapping_name, locale);
|
||||
}
|
||||
|
||||
mapping_names.append(move(mapping_name));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue