From: Daniel Arndt Date: Mon, 6 Apr 2020 21:12:26 +0000 (-0400) Subject: Use std::fill for std::vector X-Git-Tag: v9.2.0-rc1~281^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd6384bf11ae88e54f67c21e271afae6db7848d8;p=dealii.git Use std::fill for std::vector --- diff --git a/source/differentiation/ad/ad_helpers.cc b/source/differentiation/ad/ad_helpers.cc index 392fa59555..4d7fd6f79a 100644 --- a/source/differentiation/ad/ad_helpers.cc +++ b/source/differentiation/ad/ad_helpers.cc @@ -81,9 +81,9 @@ namespace Differentiation HelperBase::reset_registered_independent_variables() { - for (auto &®istered_independent_variable_value : - registered_independent_variable_values) - registered_independent_variable_value = false; + std::fill(registered_independent_variable_values.begin(), + registered_independent_variable_values.end(), + false); } @@ -93,9 +93,9 @@ namespace Differentiation HelperBase:: reset_registered_dependent_variables(const bool flag) { - for (auto &®istered_marked_dependent_variable : - registered_marked_dependent_variables) - registered_marked_dependent_variable = flag; + std::fill(registered_marked_dependent_variables.begin(), + registered_marked_dependent_variables.end(), + flag); }