]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Optimize slightly.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 10 May 2001 14:19:22 +0000 (14:19 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 10 May 2001 14:19:22 +0000 (14:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@4589 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparsity_pattern.h

index c684071ad1698dfa52b642fb5a28ef5342dec81c..d4baa0cdf3c21d890a37714a9e7f3852318f1a69 100644 (file)
@@ -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));

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.