From c1ce62178cc73283f4187c864dc0a83f12e7c46d Mon Sep 17 00:00:00 2001 From: maier Date: Sun, 31 Mar 2013 20:38:01 +0000 Subject: [PATCH] Fix a bug in ParameterHandler where parameter entries with "value" key where incorrectly treated as final nodes git-svn-id: https://svn.dealii.org/trunk@29123 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/base/parameter_handler.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deal.II/source/base/parameter_handler.cc b/deal.II/source/base/parameter_handler.cc index cacee191a2..40c512cce1 100644 --- a/deal.II/source/base/parameter_handler.cc +++ b/deal.II/source/base/parameter_handler.cc @@ -1228,7 +1228,14 @@ ParameterHandler::demangle (const std::string &s) bool ParameterHandler::is_parameter_node (const boost::property_tree::ptree &p) { - return (p.get_optional("value")); + // A parameter node must have a value key + if (p.get_optional("value")) + { + // and the associated child ptree must be final, i.e. no children: + if(p.get_child("value").size() == 0) + return true; + } + return false; } -- 2.39.5