From: Luca Heltai Date: Wed, 13 Jan 2021 15:19:18 +0000 (+0100) Subject: Fixed WB comments. X-Git-Tag: v9.3.0-rc1~649^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cd0e68e0d898287a15ec1b72561ba2f87de6dd8;p=dealii.git Fixed WB comments. --- diff --git a/include/deal.II/base/parameter_acceptor.h b/include/deal.II/base/parameter_acceptor.h index 51653b9f3a..d880718730 100644 --- a/include/deal.II/base/parameter_acceptor.h +++ b/include/deal.II/base/parameter_acceptor.h @@ -519,11 +519,11 @@ public: /** * Add the given @p subsection to the global path stored in this class. * - * This function changes the behaviour of enter_my_subsection(), by + * This function changes the behavior of enter_my_subsection(), by * appending a new subsection to the path stored in this class. * * This method can be used to split the parameters of this class into - * subsections, while still maintaining the general behaviour of this + * subsections, while still maintaining the general behavior of this * class. * * An example usage is given by the following snippet: diff --git a/source/base/parameter_acceptor.cc b/source/base/parameter_acceptor.cc index 1dfbcfb8a9..f1380d2a8a 100644 --- a/source/base/parameter_acceptor.cc +++ b/source/base/parameter_acceptor.cc @@ -204,9 +204,10 @@ ParameterAcceptor::enter_subsection(const std::string &subsection) AssertThrow(subsection.find(sep) == std::string::npos, ExcMessage( "A subsection name cannot contain the special character '/'")); - // First the easy case. - if (subsection == "") - return; + + AssertThrow(subsection != "", + ExcMessage("Cannot create an empty subsection.")); + subsections.push_back(subsection); }