From: wolf Date: Thu, 10 May 2001 14:19:22 +0000 (+0000) Subject: Optimize slightly. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d0d031872d465777d1136e17046136ad7015ad6;p=dealii-svn.git Optimize slightly. git-svn-id: https://svn.dealii.org/trunk@4589 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparsity_pattern.h b/deal.II/lac/include/lac/sparsity_pattern.h index c684071ad1..d4baa0cdf3 100644 --- a/deal.II/lac/include/lac/sparsity_pattern.h +++ b/deal.II/lac/include/lac/sparsity_pattern.h @@ -1149,7 +1149,8 @@ SparsityPattern::copy_from (const unsigned int n_rows, for (ForwardIterator i=begin; i!=end; ++i, ++row) { unsigned int *cols = &colnums[rowstart[row]] + (is_square ? 1 : 0); - for (inner_iterator j=i->begin(); j!=i->end(); ++j) + const inner_iterator end_of_row = i->end(); + for (inner_iterator j=i->begin(); j!=end_of_row; ++j) { const unsigned int col = get_column_index_from_iterator(*j); Assert (col < n_cols, ExcInvalidIndex(col,n_cols));