1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00

LibJS: Eliminate some (unnecessary) Vector copies

This commit is contained in:
AnotherTest 2020-09-08 13:17:37 +04:30 committed by Andreas Kling
parent 8d9c5a8e70
commit 699e1fdc07
4 changed files with 11 additions and 11 deletions

View file

@ -123,7 +123,7 @@ bool Console::counter_reset(String label)
Vector<String> ConsoleClient::get_trace() const
{
Vector<String> trace;
auto call_stack = m_console.interpreter().call_stack();
auto& call_stack = m_console.interpreter().call_stack();
// -2 to skip the console.trace() call frame
for (ssize_t i = call_stack.size() - 2; i >= 0; --i)
trace.append(call_stack[i].function_name);