From b168649c066d9c1e7a7180dbc413fa679a75864c Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Fri, 28 Feb 2014 15:41:33 +0000 Subject: [PATCH] fix bug: ParameterHandler::read_input() would parse the last line twice which will create an error if the last line in the .prm ends a section without a newline git-svn-id: https://svn.dealii.org/trunk@32589 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 7 +++++++ deal.II/source/base/parameter_handler.cc | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index dacfe89eac..ca740881bb 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -149,6 +149,13 @@ inconvenience this causes.

Specific improvements

    + +
  1. Fixed: ParameterHandler will no longer output an error if the file + to be read ends with "end" without a newline. +
    + (Timo Heister, 2014/02/28) +
  2. +
  3. Improved: DoFRenumbering::Cuthill_McKee can now run with distributed triangulations with the renumbering only done within each processor's subdomain. diff --git a/deal.II/source/base/parameter_handler.cc b/deal.II/source/base/parameter_handler.cc index f448fa2b50..29446174a1 100644 --- a/deal.II/source/base/parameter_handler.cc +++ b/deal.II/source/base/parameter_handler.cc @@ -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); } -- 2.39.5