Fixed format_to deprecated warning by wrapping the buffer with std::back_inserter

This commit is contained in:
gabime
2021-06-24 17:07:14 +03:00
parent 5887744d8b
commit 7b14a65b2b
6 changed files with 13 additions and 9 deletions

View File

@@ -4,6 +4,7 @@
#include <chrono>
#include <type_traits>
#include <iterator>
#include <spdlog/fmt/fmt.h>
#include <spdlog/common.h>
@@ -54,7 +55,7 @@ inline void pad2(int n, memory_buf_t &dest)
}
else // unlikely, but just in case, let fmt deal with it
{
fmt::format_to(dest, "{:02}", n);
fmt::format_to(std::back_inserter(dest), "{:02}", n);
}
}