From 6760dcebc8ece361bc970f81bfb2105747c3dfc4 Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 14 May 2016 23:54:48 +0300 Subject: [PATCH] remove unneeded strlen when writing eol at end of each line (pass size of eol to write) --- include/spdlog/details/pattern_formatter_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h index 6a33754c..265a893e 100644 --- a/include/spdlog/details/pattern_formatter_impl.h +++ b/include/spdlog/details/pattern_formatter_impl.h @@ -622,7 +622,7 @@ inline void spdlog::pattern_formatter::format(details::log_msg& msg) #if defined(SPDLOG_EOL) msg.formatted << SPDLOG_EOL; #else - msg.formatted << details::os::eol(); + msg.formatted.write(details::os::eol(), details::os::eol_size()); #endif } catch(const fmt::FormatError& e)