From 7c92cde143e7c0ddf6b26a6448e58a307204e535 Mon Sep 17 00:00:00 2001 From: cat Date: Sun, 8 Mar 2026 01:00:18 +0200 Subject: [PATCH] Tweaked LogFormatted to squash fake clangd errors --- headers/Systems/Logging.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/headers/Systems/Logging.hpp b/headers/Systems/Logging.hpp index 8a9285f..24ad37c 100644 --- a/headers/Systems/Logging.hpp +++ b/headers/Systems/Logging.hpp @@ -26,12 +26,12 @@ public: LogLevel severity = LogLevel::Info, bool assertion = true); template - static void LogFormatted(const char *format, - Corrade::Containers::StringView position, + static void LogFormatted(const char *format, const char *position, LogLevel severity, const Args &...args) { - Corrade::Containers::String formatted = - Corrade::Utility::format(format, args...); - Log(formatted, position, severity); + static Corrade::Containers::String output{Corrade::ValueInit, 4096}; + std::size_t size = Corrade::Utility::formatInto(output, format, args...); + Log(Corrade::Containers::StringView{output.begin(), size}, position, + severity); } private: