From b4755b07e07c1232a41df6ef794980b50b194522 Mon Sep 17 00:00:00 2001 From: okaestne Date: Sun, 4 Sep 2022 23:45:04 +0200 Subject: [PATCH] use os.put() for single chars --- Log.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Log.cpp b/Log.cpp index 97ed626..80c7aa9 100644 --- a/Log.cpp +++ b/Log.cpp @@ -32,7 +32,8 @@ public: std::ostream* os = getOs(lvl); if (os) { - *os << sbuf << '\n'; + *os << sbuf; + os->put('\n'); } }; @@ -83,7 +84,7 @@ private: else *os << sbuf; - *os << '\n'; + os->put('\n'); } } @@ -191,7 +192,7 @@ void init() { // set default entry metadata printing functions auto space = [](std::ostream& os, const Entry& e) -> std::ostream& { (void) e; - return os << ' '; + return os.put(' '); }; entryMetaFunctions = { defaultEntryMetaTime,