From 6b82adcb5f94621a60cd59db9974c2538955d0e5 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 25 Sep 2020 15:19:37 -0600 Subject: [PATCH] Slightly simplify some code. --- source/lac/sparsity_pattern.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/lac/sparsity_pattern.cc b/source/lac/sparsity_pattern.cc index 608392f9fc..94437de1df 100644 --- a/source/lac/sparsity_pattern.cc +++ b/source/lac/sparsity_pattern.cc @@ -913,8 +913,8 @@ SparsityPatternBase::print_gnuplot(std::ostream &out) const void SparsityPatternBase::print_svg(std::ostream &out) const { - unsigned int m = this->n_rows(); - unsigned int n = this->n_cols(); + const unsigned int m = this->n_rows(); + const unsigned int n = this->n_cols(); out << "\n\n"; - SparsityPattern::iterator it = this->begin(), end = this->end(); - for (; it != end; ++it) + for (const auto &entry : *this) { - out << " column() + 1 << "\" y=\"" - << it->row() + 1 << "\" width=\".9\" height=\".9\"/>\n"; + out << " \n"; } out << "" << std::endl; } -- 2.39.5