From 5c12f3fef045b5c45b4a9e7fb9a9949a9b5d6101 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 5 May 2020 11:48:57 +0200 Subject: js: Tighten up ReplConsoleClient::trace() a little bit Remove a bunch of unnecessary String copying. --- Userland/js.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland') 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 = ""; printf(" -> %s\n", function_name.characters()); } -- cgit v1.2.3