From: Wolfgang Bangerth Date: Fri, 25 Sep 2020 21:19:37 +0000 (-0600) Subject: Slightly simplify some code. X-Git-Tag: v9.3.0-rc1~1065^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b82adcb5f94621a60cd59db9974c2538955d0e5;p=dealii.git Slightly simplify some code. --- 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; }