]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Pay attention to the flags set for the stream.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 18 Oct 2011 13:46:17 +0000 (13:46 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 18 Oct 2011 13:46:17 +0000 (13:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@24631 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/table_handler.cc

index 20e66b5a35b536bef828949bb4c40e7a5792b2f7..965cc85909fe27140a0dbd7ab46eb946d3765347 100644 (file)
@@ -286,12 +286,18 @@ void TableHandler::write_text(std::ostream &out) const
                                           // be a bit careful about the case
                                           // where the string may be empty,
                                           // in which case we'll print it as
-                                          // ""
+                                          // "". note that ultimately we
+                                          // still just << it into the stream
+                                          // since we want to use the flags
+                                          // of that stream, and the first
+                                          // test is only used to determine
+                                          // whether the size of the string
+                                          // representation is zero
          {
            std::ostringstream text;
            text << column.entries[i].value;
            if (text.str().size() > 0)
-             out << text.str();
+             out << column.entries[i].value;
            else
              out << "\"\"";
          }

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.