From: Luca Heltai Date: Wed, 10 Apr 2019 16:40:59 +0000 (+0200) Subject: Comply with clang-tidy. X-Git-Tag: v9.1.0-rc1~143^2~8 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ba4266e91ea0a1bb7a419f3f10a2e6e5038f38f;p=dealii.git Comply with clang-tidy. --- diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index bbb5b50adf..963eaa3779 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -1803,7 +1803,7 @@ namespace Patterns std::vector vec(t.size()); unsigned int i = 0; - for (const auto entry : t) + for (const auto &entry : t) vec[i++] = Convert::to_string(entry, base_p); std::string s; diff --git a/source/base/parsed_convergence_table.cc b/source/base/parsed_convergence_table.cc index 0139d976d2..cda4afffb8 100644 --- a/source/base/parsed_convergence_table.cc +++ b/source/base/parsed_convergence_table.cc @@ -48,10 +48,10 @@ namespace for (unsigned int i = 0; i < component_names.size(); ++i) { if (unique_component_names[j] != component_names[i]) - masks.push_back(ComponentMask(bools[j++])); + masks.emplace_back(ComponentMask(bools[j++])); bools[j][i] = true; } - masks.push_back(ComponentMask(bools[j++])); + masks.emplace_back(ComponentMask(bools[j++])); AssertDimension(j, unique_component_names.size()); return masks; } @@ -174,7 +174,7 @@ ParsedConvergenceTable::output_table(std::ostream &out) if (error_file_name != "") { const std::string error_file_format = - error_file_name.substr(error_file_name.find_last_of(".") + 1); + error_file_name.substr(error_file_name.find_last_of('.') + 1); std::ofstream table_file(error_file_name);