]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a repeated subexpression. 3456/head
authorDavid Wells <wellsd2@rpi.edu>
Fri, 4 Nov 2016 22:46:14 +0000 (18:46 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Fri, 4 Nov 2016 22:46:14 +0000 (18:46 -0400)
This was caught by PVS studio.

source/lac/sparsity_pattern.cc

index 29388bf5017278599d0cc98eb1ca1230ae8330d0..fdd32cfbc2b3388a1fab817f1e516a35758896cc 100644 (file)
@@ -577,9 +577,7 @@ void SparsityPattern::copy_from (const FullMatrix<number> &matrix)
           ++entries_per_row[row];
       if ((matrix.m() == matrix.n())
           &&
-          (matrix(row,row) == 0)
-          &&
-          (matrix.m() == matrix.n()))
+          (matrix(row,row) == 0))
         ++entries_per_row[row];
     }
 

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.