From 2eb52cd047aca64918bed9cd2d92101f8d3703c6 Mon Sep 17 00:00:00 2001 From: gabime Date: Wed, 28 Aug 2019 18:50:11 +0300 Subject: [PATCH] Unified usage of fmt::memory_buffer across the codebase --- bench/formatter-bench.cpp | 2 +- tests/test_file_logging.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bench/formatter-bench.cpp b/bench/formatter-bench.cpp index d251c56c..405707c9 100644 --- a/bench/formatter-bench.cpp +++ b/bench/formatter-bench.cpp @@ -11,7 +11,7 @@ void bench_formatter(benchmark::State &state, std::string pattern) { auto formatter = spdlog::details::make_unique(pattern); - fmt::memory_buffer dest; + spdlog::memory_buf_t dest; std::string logger_name = "logger-name"; const char *text = "Hello. This is some message with length of 80 "; diff --git a/tests/test_file_logging.cpp b/tests/test_file_logging.cpp index 4de3a742..357d4b87 100644 --- a/tests/test_file_logging.cpp +++ b/tests/test_file_logging.cpp @@ -102,7 +102,7 @@ TEST_CASE("daily_logger with dateonly calculator", "[daily_logger_dateonly]]") // calculate filename (time based) std::string basename = "logs/daily_dateonly"; std::tm tm = spdlog::details::os::localtime(); - fmt::memory_buffer w; + spdlog::memory_buf_t w; fmt::format_to(w, "{}_{:04d}-{:02d}-{:02d}", basename, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); auto logger = spdlog::create("logger", basename, 0, 0); @@ -120,7 +120,7 @@ struct custom_daily_file_name_calculator { static spdlog::filename_t calc_filename(const spdlog::filename_t &basename, const tm &now_tm) { - fmt::memory_buffer w; + spdlog::memory_buf_t w; fmt::format_to(w, "{}{:04d}{:02d}{:02d}", basename, now_tm.tm_year + 1900, now_tm.tm_mon + 1, now_tm.tm_mday); return fmt::to_string(w); } @@ -134,7 +134,7 @@ TEST_CASE("daily_logger with custom calculator", "[daily_logger_custom]]") // calculate filename (time based) std::string basename = "logs/daily_dateonly"; std::tm tm = spdlog::details::os::localtime(); - fmt::memory_buffer w; + spdlog::memory_buf_t w; fmt::format_to(w, "{}{:04d}{:02d}{:02d}", basename, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); auto logger = spdlog::create("logger", basename, 0, 0);