diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-04 19:25:03 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-04 19:25:03 +0100 |
| commit | e791ac9a46095e0241181da89c35a7c702982c21 (patch) | |
| tree | d959c79c24ae03282f1b00ec9bcb2ccf86d9c96c /lib/nes/common/string-builder.hh | |
| parent | 0f22ed2ef160eef2da6080782943b22c9539650d (diff) | |
clean up path logic a bit
Diffstat (limited to 'lib/nes/common/string-builder.hh')
| -rw-r--r-- | lib/nes/common/string-builder.hh | 13 |
1 files changed, 13 insertions, 0 deletions
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<u32 Capacity> + 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 |
