summaryrefslogtreecommitdiff
path: root/Userland/Shell/AST.cpp
diff options
context:
space:
mode:
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) };
}
}