mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
Everywhere: Use _{short_,}string to create Strings from literals
This commit is contained in:
parent
85414d9338
commit
09d40bfbb2
92 changed files with 334 additions and 310 deletions
|
@ -1241,7 +1241,7 @@ ThrowCompletionOr<RawFormatResult> to_raw_fixed(VM& vm, MathematicalValue const&
|
|||
|
||||
// 7. If n = 0, let m be "0". Otherwise, let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes).
|
||||
result.formatted_string = n.is_zero()
|
||||
? String::from_utf8_short_string("0"sv)
|
||||
? "0"_short_string
|
||||
: MUST_OR_THROW_OOM(n.to_string(vm));
|
||||
|
||||
// 8. If f ≠ 0, then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue