From 23da9f13b069ac90de415e28601514468565bbe9 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 19 Oct 2018 16:31:43 +0300 Subject: [PATCH] Fixed valgrind warning in example --- example/example.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/example/example.cpp b/example/example.cpp index 15ca856e..6ee37af3 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -146,7 +146,11 @@ void async_example() #include "spdlog/fmt/bin_to_hex.h" void binary_example() { - std::array buf; + std::vector buf; + for(int i = 0; i < 80; i++) + { + buf.push_back(static_cast(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: