]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix bug: ParameterHandler::read_input() would parse the last line twice which will...
authorTimo Heister <timo.heister@gmail.com>
Fri, 28 Feb 2014 15:41:33 +0000 (15:41 +0000)
committerTimo Heister <timo.heister@gmail.com>
Fri, 28 Feb 2014 15:41:33 +0000 (15:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@32589 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/source/base/parameter_handler.cc

index dacfe89eac511cbc57d3e1cc860634d7be657e42..ca740881bb7d5257874869f2aac347547f67896e 100644 (file)
@@ -149,6 +149,13 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+
+  <li> Fixed: ParameterHandler will no longer output an error if the file
+  to be read ends with "end" without a newline.
+  <br>
+  (Timo Heister, 2014/02/28)
+  </li>
+
   <li>Improved: DoFRenumbering::Cuthill_McKee can now run with distributed
   triangulations with the renumbering only done within each processor's
   subdomain.
index f448fa2b50674dab99d9e98f7f85324d2b78606b..29446174a1789fcfa0d913cf03cde4e94889b109 100644 (file)
@@ -1322,10 +1322,9 @@ bool ParameterHandler::read_input (std::istream &input,
   int lineno=0;
   bool status = true;
 
-  while (input)
+  while (getline (input, line))
     {
       ++lineno;
-      getline (input, line);
       status &= scan_line (line, filename, lineno);
     }
 

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.