From 2be77360105b270285455931417a6a3bc91b7859 Mon Sep 17 00:00:00 2001 From: asynts Date: Wed, 7 Oct 2020 13:59:26 +0200 Subject: [PATCH] Kernel: Add KBufferBuilder::appendff. Why does this class exist anyways? What is wrong with using StringBuilder? --- Kernel/KBufferBuilder.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Kernel/KBufferBuilder.h b/Kernel/KBufferBuilder.h index 62e4ec7582..affef2bbe8 100644 --- a/Kernel/KBufferBuilder.h +++ b/Kernel/KBufferBuilder.h @@ -45,6 +45,14 @@ public: void appendf(const char*, ...); void appendvf(const char*, va_list); + template + void appendff(StringView fmtstr, const Parameters&... parameters) + { + // FIXME: This is really not the way to go about it, but vformat expects a + // StringBuilder. Why does this class exist anyways? + append(String::formatted(fmtstr, parameters...)); + } + KBuffer build(); private: