Commit 23da9f13 authored by gabime's avatar gabime

Fixed valgrind warning in example

parent a5a39c52
......@@ -146,7 +146,11 @@ void async_example()
#include "spdlog/fmt/bin_to_hex.h"
void binary_example()
{
std::array<char, 80> buf;
std::vector<char> buf;
for(int i = 0; i < 80; i++)
{
buf.push_back(static_cast<char>(i & 0xff));
}
spdlog::info("Binary example: {}", spdlog::to_hex(buf));
spdlog::info("Another binary example:{:n}", spdlog::to_hex(std::begin(buf), std::begin(buf) + 10));
// more examples:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment