mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +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:
parent
d0ba5f2ed7
commit
51c3967516
15 changed files with 94 additions and 95 deletions
|
@ -1314,7 +1314,7 @@ ErrorOr<int> Shell::builtin_argsparser_parse(Main::Arguments arguments)
|
|||
auto try_convert = [](StringView value, Type type) -> ErrorOr<Optional<RefPtr<AST::Value>>> {
|
||||
switch (type) {
|
||||
case Type::Bool:
|
||||
return AST::make_ref_counted<AST::StringValue>(TRY(String::from_utf8("true"sv)));
|
||||
return AST::make_ref_counted<AST::StringValue>(TRY("true"_string));
|
||||
case Type::String:
|
||||
return AST::make_ref_counted<AST::StringValue>(TRY(String::from_utf8(value)));
|
||||
case Type::I32:
|
||||
|
@ -1498,7 +1498,7 @@ ErrorOr<int> Shell::builtin_argsparser_parse(Main::Arguments arguments)
|
|||
if (type == Type::Bool) {
|
||||
set_local_variable(
|
||||
current_variable,
|
||||
make_ref_counted<AST::StringValue>(MUST(String::from_utf8("false"sv))),
|
||||
make_ref_counted<AST::StringValue>(MUST("false"_string)),
|
||||
true);
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue