1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:28:11 +00:00

Everywhere: Use '_{short_,}string' literals more

This mostly updates code what was written before but merged after these
were added.
This commit is contained in:
Linus Groh 2023-02-28 13:50:29 +00:00
parent d0ba5f2ed7
commit 51c3967516
15 changed files with 94 additions and 95 deletions

View file

@ -80,7 +80,7 @@ ErrorOr<RefPtr<AST::Node>> Shell::immediate_length_impl(AST::ImmediateExpression
// ImmediateExpression(length <mode_name> <entry>)
resulting_nodes.unchecked_append(AST::make_ref_counted<AST::ImmediateExpression>(
expr_node->position(),
AST::NameWithPosition { TRY(String::from_utf8("length"sv)), invoking_node.function_position() },
AST::NameWithPosition { TRY("length"_string), invoking_node.function_position() },
NonnullRefPtrVector<AST::Node> { Vector<NonnullRefPtr<AST::Node>> {
static_cast<NonnullRefPtr<AST::Node>>(AST::make_ref_counted<AST::BarewordLiteral>(expr_node->position(), TRY(String::from_utf8(mode_name)))),
AST::make_ref_counted<AST::SyntheticNode>(expr_node->position(), NonnullRefPtr<AST::Value>(entry)),