lib/fmt/ToBuffer: use iterator instead of pointer

This commit is contained in:
Max Kellermann 2022-11-28 22:59:26 +01:00
parent 40d0828ccd
commit ed08a4bd58

View File

@ -42,7 +42,7 @@ auto
VFmtBuffer(fmt::string_view format_str, fmt::format_args args) noexcept
{
StringBuffer<size> buffer;
auto [p, _] = fmt::vformat_to_n(buffer.data(), buffer.capacity() - 1,
auto [p, _] = fmt::vformat_to_n(buffer.begin(), buffer.capacity() - 1,
format_str, args);
*p = 0;
return buffer;