]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed WB comments. 11506/head
authorLuca Heltai <luca.heltai@sissa.it>
Wed, 13 Jan 2021 15:19:18 +0000 (16:19 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Wed, 13 Jan 2021 15:19:18 +0000 (16:19 +0100)
include/deal.II/base/parameter_acceptor.h
source/base/parameter_acceptor.cc

index 51653b9f3aa68dd1f16518a3dc3b81b5ee42b897..d880718730a69d413e5f1e2d1cf708edd9d4e543 100644 (file)
@@ -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:
index 1dfbcfb8a9727d1a386a8bae6380158faeb85c78..f1380d2a8a1326c80ee0557e1f7d288bdc61733d 100644 (file)
@@ -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);
 }
 

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.