From: Wolfgang Bangerth Date: Tue, 14 Aug 2018 18:42:01 +0000 (-0600) Subject: Simplify the initialization of a variety of objects. X-Git-Tag: v9.1.0-rc1~821^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff0e2443f433903b333aae6e9abee7e8dd713fd3;p=dealii.git Simplify the initialization of a variety of objects. --- diff --git a/include/deal.II/base/parameter_acceptor.h b/include/deal.II/base/parameter_acceptor.h index db438221a6..71546e0689 100644 --- a/include/deal.II/base/parameter_acceptor.h +++ b/include/deal.II/base/parameter_acceptor.h @@ -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::to_pattern()); diff --git a/include/deal.II/base/parameter_handler.h b/include/deal.II/base/parameter_handler.h index b5b906e9f4..b7ea141f88 100644 --- a/include/deal.II/base/parameter_handler.h +++ b/include/deal.II/base/parameter_handler.h @@ -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::to_pattern()); diff --git a/include/deal.II/base/timer.h b/include/deal.II/base/timer.h index 7c9e17be94..1acb5750d2 100644 --- a/include/deal.II/base/timer.h +++ b/include/deal.II/base/timer.h @@ -802,13 +802,13 @@ public: * is left. */ void - leave_subsection(const std::string §ion_name = std::string()); + leave_subsection(const std::string §ion_name = ""); /** * Same as @p leave_subsection. */ void - exit_section(const std::string §ion_name = std::string()); + exit_section(const std::string §ion_name = ""); /** * Get a map with the collected data of the specified type for each subsection diff --git a/include/deal.II/numerics/kdtree.h b/include/deal.II/numerics/kdtree.h index 5cdb6b8ac9..bb8deec461 100644 --- a/include/deal.II/numerics/kdtree.h +++ b/include/deal.II/numerics/kdtree.h @@ -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> &pts = std::vector>()); + const std::vector> &pts = {}); /** diff --git a/source/numerics/solution_transfer.cc b/source/numerics/solution_transfer.cc index 9e77a70d0b..bc97775ab0 100644 --- a/source/numerics/solution_transfer.cc +++ b/source/numerics/solution_transfer.cc @@ -427,7 +427,7 @@ void SolutionTransfer:: prepare_for_coarsening_and_refinement(const VectorType &in) { - std::vector all_in = std::vector(1, in); + std::vector all_in(1, in); prepare_for_coarsening_and_refinement(all_in); }