[ox/std] Make CharBufferWriter constructor take a Span

This commit is contained in:
Gary Talent 2024-11-26 20:42:33 -06:00
parent e13eebaf0b
commit 8f25ef96ff
2 changed files with 2 additions and 3 deletions

View File

@ -100,8 +100,7 @@ class CharBuffWriter {
char *m_buff = nullptr;
public:
template<std::size_t sz>
explicit constexpr CharBuffWriter(ox::Array<char, sz> &buff) noexcept:
explicit constexpr CharBuffWriter(ox::Span<char> buff) noexcept:
m_cap(buff.size()),
m_buff(buff.data()) {
}

View File

@ -88,7 +88,7 @@ class FmtArg {
if constexpr(is_bool_v<T>) {
return v ? "true" : "false";
} else if constexpr(is_integer_v<T>) {
ox::CharBuffWriter w(dataStr.data(), DataSz);
ox::CharBuffWriter w{dataStr};
std::ignore = ox::writeItoa(v, w);
return dataStr.data();
} else {