diff --git a/dune/common/densematrix.hh b/dune/common/densematrix.hh index 63862e42e73805cefe5bb2ee77f966b82eb13742..717342f025b872fa153d3e97dac262f1fa4af62e 100644 --- a/dune/common/densematrix.hh +++ b/dune/common/densematrix.hh @@ -574,7 +574,7 @@ namespace Dune using std::max; real_type norm = 0; - for (auto&& x : *this) { + for (auto const &x : *this) { real_type const a = x.one_norm(); norm = max(a, norm); } @@ -589,7 +589,7 @@ namespace Dune using std::max; real_type norm = 0; - for (auto&& x : *this) { + for (auto const &x : *this) { real_type const a = x.one_norm_real(); norm = max(a, norm); } @@ -605,7 +605,7 @@ namespace Dune real_type norm = 0; real_type isNaN = 1; - for (auto&& x : *this) { + for (auto const &x : *this) { real_type const a = x.one_norm(); norm = max(a, norm); isNaN += a; @@ -623,7 +623,7 @@ namespace Dune real_type norm = 0; real_type isNaN = 1; - for (auto&& x : *this) { + for (auto const &x : *this) { real_type const a = x.one_norm_real(); norm = max(a, norm); isNaN += a; diff --git a/dune/common/densevector.hh b/dune/common/densevector.hh index b322f07408e0451f1e40b264b231bac88593a43e..4339196d766ee6be49e7516441669928a335f55d 100644 --- a/dune/common/densevector.hh +++ b/dune/common/densevector.hh @@ -612,7 +612,7 @@ namespace Dune { using std::max; real_type norm = 0; - for (auto&& x : *this) { + for (auto const &x : *this) { real_type const a = abs(x); norm = max(a, norm); } @@ -627,7 +627,7 @@ namespace Dune { using std::max; real_type norm = 0; - for (auto&& x : *this) { + for (auto const &x : *this) { real_type const a = fvmeta::absreal(x); norm = max(a, norm); } @@ -644,7 +644,7 @@ namespace Dune { real_type norm = 0; real_type isNaN = 1; - for (auto&& x : *this) { + for (auto const &x : *this) { real_type const a = abs(x); norm = max(a, norm); isNaN += a; @@ -662,7 +662,7 @@ namespace Dune { real_type norm = 0; real_type isNaN = 1; - for (auto&& x : *this) { + for (auto const &x : *this) { real_type const a = fvmeta::absreal(x); norm = max(a, norm); isNaN += a;