mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Fixed format_to deprecated warning by wrapping the buffer with std::back_inserter
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user