summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-05 11:48:57 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-05 11:49:14 +0200
commit5c12f3fef045b5c45b4a9e7fb9a9949a9b5d6101 (patch)
tree7958001e5b48ce4c7385289a28ba191a2c7d634d /Userland
parente4b9cf9b6ca2cfbe020a1d147a07b6b8db7b7f48 (diff)
downloadserenity-5c12f3fef045b5c45b4a9e7fb9a9949a9b5d6101.zip
js: Tighten up ReplConsoleClient::trace() a little bit
Remove a bunch of unnecessary String copying.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/js.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/js.cpp b/Userland/js.cpp
index 0389a5318f..14e080e27a 100644
--- a/Userland/js.cpp
+++ b/Userland/js.cpp
@@ -437,8 +437,8 @@ public:
{
puts(interpreter().join_arguments().characters());
auto trace = interpreter().get_trace();
- for (auto function_name : trace) {
- if (String(function_name).is_empty())
+ for (auto& function_name : trace) {
+ if (function_name.is_empty())
function_name = "<anonymous>";
printf(" -> %s\n", function_name.characters());
}