From: Guido Kanschat Date: Mon, 26 Feb 2001 20:56:01 +0000 (+0000) Subject: underflow in LogStreem removed X-Git-Tag: v8.0.0~19681 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=850bbbaf3416faec50e20458c2ccc05f526b5e0a;p=dealii.git underflow in LogStreem removed git-svn-id: https://svn.dealii.org/trunk@4036 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/source/log.cc b/deal.II/base/source/log.cc index 4370bf98e3..0e2753c289 100644 --- a/deal.II/base/source/log.cc +++ b/deal.II/base/source/log.cc @@ -74,7 +74,8 @@ LogStream::push (const std::string& text) void LogStream::pop () { - prefixes.pop(); + if (prefixes.size() > 1) + prefixes.pop(); }; @@ -110,6 +111,8 @@ LogStream::print_line_head() utime = usage.ru_utime.tv_sec + 1.e-6 * usage.ru_utime.tv_usec; } + const string& head = prefixes.top(); + if (prefixes.size() <= std_depth) { if (print_utime) @@ -118,7 +121,7 @@ LogStream::print_line_head() *std_out << utime << ':'; std_out->width(p); } - *std_out << prefixes.top() << ':'; + *std_out << head << ':'; } if (file && (prefixes.size() <= file_depth)) @@ -129,7 +132,7 @@ LogStream::print_line_head() *file << utime << ':'; file->width(p); } - *file << prefixes.top() << ':'; + *file << head << ':'; } }