mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
Everywhere: Use _{short_,}string to create Strings from literals
This commit is contained in:
parent
85414d9338
commit
09d40bfbb2
Notes:
sideshowbarker
2024-07-16 23:45:42 +09:00
Author: https://github.com/linusg
Commit: 09d40bfbb2
Pull-request: https://github.com/SerenityOS/serenity/pull/17619
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/MacDue
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/trflynn89
92 changed files with 334 additions and 310 deletions
|
@ -464,7 +464,7 @@ ThrowCompletionOr<LocaleResult> resolve_locale(VM& vm, Vector<String> const& req
|
|||
// 4. Else if keyLocaleData contains "true", then
|
||||
else if (key_locale_data.contains_slow("true"sv)) {
|
||||
// a. Let value be "true".
|
||||
value = TRY_OR_THROW_OOM(vm, String::from_utf8("true"sv));
|
||||
value = TRY_OR_THROW_OOM(vm, "true"_string);
|
||||
|
||||
// b. Let supportedExtensionAddition be the string-concatenation of "-" and key.
|
||||
supported_extension_addition = ::Locale::Keyword { TRY_OR_THROW_OOM(vm, String::from_utf8(key)), {} };
|
||||
|
@ -487,7 +487,7 @@ ThrowCompletionOr<LocaleResult> resolve_locale(VM& vm, Vector<String> const& req
|
|||
// 3. If optionsValue is the empty String, then
|
||||
if (options_value->is_empty()) {
|
||||
// a. Let optionsValue be "true".
|
||||
options_value = TRY_OR_THROW_OOM(vm, String::from_utf8("true"sv));
|
||||
options_value = TRY_OR_THROW_OOM(vm, "true"_string);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue