From 8f25ef96ffd73e748953bd249c908a095a67e6a8 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 26 Nov 2024 20:42:33 -0600 Subject: [PATCH] [ox/std] Make CharBufferWriter constructor take a Span --- deps/ox/src/ox/std/buffer.hpp | 3 +-- deps/ox/src/ox/std/fmt.hpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/deps/ox/src/ox/std/buffer.hpp b/deps/ox/src/ox/std/buffer.hpp index b49d9eb9..6ba9db40 100644 --- a/deps/ox/src/ox/std/buffer.hpp +++ b/deps/ox/src/ox/std/buffer.hpp @@ -100,8 +100,7 @@ class CharBuffWriter { char *m_buff = nullptr; public: - template - explicit constexpr CharBuffWriter(ox::Array &buff) noexcept: + explicit constexpr CharBuffWriter(ox::Span buff) noexcept: m_cap(buff.size()), m_buff(buff.data()) { } diff --git a/deps/ox/src/ox/std/fmt.hpp b/deps/ox/src/ox/std/fmt.hpp index a7558c1c..0ec2aa2a 100644 --- a/deps/ox/src/ox/std/fmt.hpp +++ b/deps/ox/src/ox/std/fmt.hpp @@ -88,7 +88,7 @@ class FmtArg { if constexpr(is_bool_v) { return v ? "true" : "false"; } else if constexpr(is_integer_v) { - ox::CharBuffWriter w(dataStr.data(), DataSz); + ox::CharBuffWriter w{dataStr}; std::ignore = ox::writeItoa(v, w); return dataStr.data(); } else {