summaryrefslogtreecommitdiff
path: root/Kernel/KBufferBuilder.cpp
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-12-30 13:43:45 +0100
committerAndreas Kling <kling@serenityos.org>2021-12-30 14:16:03 +0100
commit1d2f78682b83706207aaf8328681ae7c1e2ea793 (patch)
tree936ef2f3272bbbf96ed8e28219e2db034ea7cc85 /Kernel/KBufferBuilder.cpp
parent726c023f9e2297c35614e595b221e97b2e5ec6a7 (diff)
downloadserenity-1d2f78682b83706207aaf8328681ae7c1e2ea793.zip
Kernel+AK: Eliminate a couple of temporary String allocations
Diffstat (limited to 'Kernel/KBufferBuilder.cpp')
-rw-r--r--Kernel/KBufferBuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/KBufferBuilder.cpp b/Kernel/KBufferBuilder.cpp
index e7f9b8b55f..edc6fe227e 100644
--- a/Kernel/KBufferBuilder.cpp
+++ b/Kernel/KBufferBuilder.cpp
@@ -121,7 +121,7 @@ ErrorOr<void> KBufferBuilder::append_escaped_for_json(StringView string)
break;
default:
if (ch >= 0 && ch <= 0x1f)
- TRY(append(String::formatted("\\u{:04x}", ch)));
+ TRY(appendff("\\u{:04x}", ch));
else
TRY(append(ch));
}