]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Initialize a variable to avoid a warning.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 6 Nov 2013 12:40:36 +0000 (12:40 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 6 Nov 2013 12:40:36 +0000 (12:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@31562 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/sparse_matrix.h

index 79b71911acb1d0dc8cc56f5a34b5cdae54b84b2b..46a05ba90e72857588f0037bd7ed06720413d8ea 100644 (file)
@@ -1492,7 +1492,9 @@ public:
    * elements in a row are written in ascending column order.
    */
   template <class STREAM>
-  void print (STREAM &out, bool across=false, bool diagonal_first=true) const;
+  void print (STREAM &out,
+             const bool across = false,
+             const bool diagonal_first = true) const;
 
   /**
    * Print the matrix in the usual format, i.e. as a matrix and not as a list
@@ -2474,13 +2476,15 @@ SparseMatrix<number>::end (const size_type r)
 template <typename number>
 template <class STREAM>
 inline
-void SparseMatrix<number>::print (STREAM &out, bool across, bool diagonal_first) const
+void SparseMatrix<number>::print (STREAM &out,
+                                 const bool across,
+                                 const bool diagonal_first) const
 {
   Assert (cols != 0, ExcNotInitialized());
   Assert (val != 0, ExcNotInitialized());
 
   bool hanging_diagonal = false;
-  number diagonal;
+  number diagonal = number();
 
   for (size_type i=0; i<cols->rows; ++i)
     {

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.