[ox/std] Make CharBufferWriter constructor take a Span
This commit is contained in:
parent
e13eebaf0b
commit
8f25ef96ff
3
deps/ox/src/ox/std/buffer.hpp
vendored
3
deps/ox/src/ox/std/buffer.hpp
vendored
@ -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()) {
|
||||
}
|
||||
|
2
deps/ox/src/ox/std/fmt.hpp
vendored
2
deps/ox/src/ox/std/fmt.hpp
vendored
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user