From e791ac9a46095e0241181da89c35a7c702982c21 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Tue, 4 Feb 2025 19:25:03 +0100 Subject: clean up path logic a bit --- lib/nes/app/graphics/renderer.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/nes/app/graphics/renderer.hh') diff --git a/lib/nes/app/graphics/renderer.hh b/lib/nes/app/graphics/renderer.hh index 5b9ec48..cfc1889 100644 --- a/lib/nes/app/graphics/renderer.hh +++ b/lib/nes/app/graphics/renderer.hh @@ -56,10 +56,10 @@ namespace nes::app i32 const x, i32 const y, color const c, text_attributes const attrs, std::string_view const fmt, Args... args) -> u32 { - char buffer[width]; - auto const str = string_builder{ buffer, sizeof(buffer) }.append_format(fmt, args...).get_result(); - render_text(x, y, str, c, attrs); - return static_cast(str.length()); + string_buffer buffer{}; + buffer.append_format(fmt, args...); + render_text(x, y, buffer.get_result(), c, attrs); + return static_cast(buffer.get_result().length()); } template -- cgit v1.3.1