]> https://gitweb.dealii.org/ - dealii.git/commitdiff
underflow in LogStreem removed
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 26 Feb 2001 20:56:01 +0000 (20:56 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 26 Feb 2001 20:56:01 +0000 (20:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@4036 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/log.cc

index 4370bf98e32c1f1e80c5e7d53ca67f49051e2e92..0e2753c289be57d5011b4e9a03cd29be88a69cf2 100644 (file)
@@ -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 << ':';
     }
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.