mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +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
Notes:
sideshowbarker
2024-07-17 23:22:33 +09:00
Author: https://github.com/trflynn89
Commit: 71903ea7e1
Pull-request: https://github.com/SerenityOS/serenity/pull/11128
Reviewed-by: https://github.com/linusg ✅
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