summaryrefslogtreecommitdiff
path: root/Userland/Shell/AST.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2023-02-28 13:50:29 +0000
committerLinus Groh <mail@linusgroh.de>2023-02-28 15:15:36 +0000
commit51c3967516cdce42d40c26debaec7f6ef949420b (patch)
tree60292c772c23b3d1c2cdece4ac6cdd28f2152c6c /Userland/Shell/AST.cpp
parentd0ba5f2ed7d2fa397328638457083876338b34e3 (diff)
downloadserenity-51c3967516cdce42d40c26debaec7f6ef949420b.zip
Everywhere: Use '_{short_,}string' literals more
This mostly updates code what was written before but merged after these were added.
Diffstat (limited to 'Userland/Shell/AST.cpp')
-rw-r--r--Userland/Shell/AST.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Shell/AST.cpp b/Userland/Shell/AST.cpp
index 095de9adbc..04bc99aa4d 100644
--- a/Userland/Shell/AST.cpp
+++ b/Userland/Shell/AST.cpp
@@ -1259,7 +1259,7 @@ ErrorOr<RefPtr<Value>> ForLoop::run(RefPtr<Shell> shell)
};
if (m_iterated_expression) {
- auto variable_name = m_variable.has_value() ? m_variable->name : String::from_utf8_short_string("it"sv);
+ auto variable_name = m_variable.has_value() ? m_variable->name : "it"_short_string;
Optional<StringView> index_name = m_index_variable.has_value() ? Optional<StringView>(m_index_variable->name) : Optional<StringView>();
size_t i = 0;
TRY(m_iterated_expression->for_each_entry(shell, [&](auto value) -> ErrorOr<IterationDecision> {
@@ -3877,11 +3877,11 @@ ErrorOr<Vector<String>> SpecialVariableValue::resolve_as_list(RefPtr<Shell> shel
auto list_argv = static_cast<AST::ListValue const*>(argv.ptr());
return { resolve_slices(shell, Vector { TRY(String::number(list_argv->values().size())) }, m_slices) };
}
- return { resolve_slices(shell, Vector { String::from_utf8_short_string("1"sv) }, m_slices) };
+ return { resolve_slices(shell, Vector { "1"_short_string }, m_slices) };
}
- return { resolve_slices(shell, Vector { String::from_utf8_short_string("0"sv) }, m_slices) };
+ return { resolve_slices(shell, Vector { "0"_short_string }, m_slices) };
default:
- return { resolve_slices(shell, Vector { String::from_utf8_short_string(""sv) }, m_slices) };
+ return { resolve_slices(shell, Vector { String {} }, m_slices) };
}
}