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/common/string-builder.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/nes/common/string-builder.hh') diff --git a/lib/nes/common/string-builder.hh b/lib/nes/common/string-builder.hh index fda85a4..e0bc673 100644 --- a/lib/nes/common/string-builder.hh +++ b/lib/nes/common/string-builder.hh @@ -95,4 +95,17 @@ namespace nes auto append_format(std::string_view fmt, format_arg const* args, u32 arg_count) -> string_builder&; auto append_format_arg(format_arg, std::string_view params) -> string_builder&; }; + + /// A string builder with a buffer embedded into it. + template + class string_buffer : public string_builder + { + char buffer_[Capacity]; + + public: + explicit string_buffer() + : string_builder{ buffer_, Capacity } + { + } + }; } // namespace nes \ No newline at end of file -- cgit v1.3.1