]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify the initialization of a variety of objects. 7064/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 14 Aug 2018 18:42:01 +0000 (12:42 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 Aug 2018 01:38:37 +0000 (19:38 -0600)
include/deal.II/base/parameter_acceptor.h
include/deal.II/base/parameter_handler.h
include/deal.II/base/timer.h
include/deal.II/numerics/kdtree.h
source/numerics/solution_transfer.cc

index db438221a6f6820a062e525744f6594ac742e424..71546e0689ac94bd4da25c25939fc6ece5bff974 100644 (file)
@@ -497,7 +497,7 @@ public:
   void
   add_parameter(const std::string &          entry,
                 ParameterType &              parameter,
-                const std::string &          documentation = std::string(),
+                const std::string &          documentation = "",
                 ParameterHandler &           prm_          = prm,
                 const Patterns::PatternBase &pattern =
                   *Patterns::Tools::Convert<ParameterType>::to_pattern());
index b5b906e9f4646a84166bb531c4534f6c5cc22ea5..b7ea141f88a23c71d53d5a0b853557d867187557 100644 (file)
@@ -1025,7 +1025,7 @@ public:
   declare_entry(const std::string &          entry,
                 const std::string &          default_value,
                 const Patterns::PatternBase &pattern = Patterns::Anything(),
-                const std::string &          documentation = std::string());
+                const std::string &          documentation = "");
 
   /**
    * Attach an action to the parameter with name @p entry in the current
@@ -1087,7 +1087,7 @@ public:
   void
   add_parameter(const std::string &          entry,
                 ParameterType &              parameter,
-                const std::string &          documentation = std::string(),
+                const std::string &          documentation = "",
                 const Patterns::PatternBase &pattern =
                   *Patterns::Tools::Convert<ParameterType>::to_pattern());
 
index 7c9e17be94f492e8f0d73127cda12d4640a50eee..1acb5750d246ad5d196e17c021cde1a4e79a4441 100644 (file)
@@ -802,13 +802,13 @@ public:
    * is left.
    */
   void
-  leave_subsection(const std::string &section_name = std::string());
+  leave_subsection(const std::string &section_name = "");
 
   /**
    * Same as @p leave_subsection.
    */
   void
-  exit_section(const std::string &section_name = std::string());
+  exit_section(const std::string &section_name = "");
 
   /**
    * Get a map with the collected data of the specified type for each subsection
index 5cdb6b8ac9f6eb675a2aa7eea58238b54ee0482d..bb8deec4614ff60714c1e5a87d767b445f88bf2e 100644 (file)
@@ -86,7 +86,7 @@ public:
    * again, then all following results will likely be wrong.
    */
   KDTree(const unsigned int             max_leaf_size = 10,
-         const std::vector<Point<dim>> &pts = std::vector<Point<dim>>());
+         const std::vector<Point<dim>> &pts           = {});
 
 
   /**
index 9e77a70d0b13a1a4736b9ac91ac793697ee84605..bc97775ab0d55958bb826b52f2bdbf763ce16ad6 100644 (file)
@@ -427,7 +427,7 @@ void
 SolutionTransfer<dim, VectorType, DoFHandlerType>::
   prepare_for_coarsening_and_refinement(const VectorType &in)
 {
-  std::vector<VectorType> all_in = std::vector<VectorType>(1, in);
+  std::vector<VectorType> all_in(1, in);
   prepare_for_coarsening_and_refinement(all_in);
 }
 

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.