From 09586d760833dac680ba8837b0b695ed3900c96d Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sat, 30 Sep 2017 15:30:53 +0200 Subject: nxcomp/src/Log.{cpp,h}: port to std::stack as internal buffer structure. This has one drawback: after flushing log data to its underlying output, a new NXLogStamp object MUST be written to the NXLog object in order to create a new entry within the stack. This can be changed if necessary. For now I'd like to keep it as-is. --- nxcomp/src/Log.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'nxcomp/src/Log.cpp') diff --git a/nxcomp/src/Log.cpp b/nxcomp/src/Log.cpp index 66ae1bd78..83e11b98a 100644 --- a/nxcomp/src/Log.cpp +++ b/nxcomp/src/Log.cpp @@ -109,14 +109,12 @@ NXLog& operator<< (NXLog& out, const NXLogStamp& value) out.current_file( value.file() ); // Writing an NXLogStamp to the stream indicates the start of a new entry. - // If there's any content in the buffer, we flush it to finalize the previous - // log entry. + // If there's any content in the buffer, create a new entry in the output + // queue. if ( out.synchronized() ) - out.flush(); - + out.new_stack_entry(); out << out.stamp_to_string(value); return out; } - -- cgit v1.2.3