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=refs%2Fpull%2F10972%2Fhead;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; }