]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mark a bunch of input arguments as 'const'. 9202/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 30 Dec 2019 18:55:02 +0000 (11:55 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 30 Dec 2019 19:04:38 +0000 (12:04 -0700)
source/lac/sparse_direct.cc

index 2592e599d9a959ca2a6c48a0cbcc7ae1be414fdc..9a225192ab2a7cb5ee5cc6d0de7a47f0e34e44f7 100644 (file)
@@ -296,7 +296,7 @@ SparseDirectUMFPACK::factorize(const Matrix &matrix)
 
 void
 SparseDirectUMFPACK::solve(Vector<double> &rhs_and_solution,
-                           bool            transpose /*=false*/) const
+                           const bool      transpose /*=false*/) const
 {
   // make sure that some kind of factorize() call has happened before
   Assert(Ap.size() != 0, ExcNotInitialized());
@@ -328,7 +328,7 @@ SparseDirectUMFPACK::solve(Vector<double> &rhs_and_solution,
 
 void
 SparseDirectUMFPACK::solve(BlockVector<double> &rhs_and_solution,
-                           bool                 transpose /*=false*/) const
+                           const bool           transpose /*=false*/) const
 {
   // the UMFPACK functions want a contiguous array of elements, so
   // there is no way around copying data around. thus, just copy the
@@ -345,7 +345,7 @@ template <class Matrix>
 void
 SparseDirectUMFPACK::solve(const Matrix &  matrix,
                            Vector<double> &rhs_and_solution,
-                           bool            transpose /*=false*/)
+                           const bool      transpose /*=false*/)
 {
   factorize(matrix);
   solve(rhs_and_solution, transpose);
@@ -356,7 +356,7 @@ template <class Matrix>
 void
 SparseDirectUMFPACK::solve(const Matrix &       matrix,
                            BlockVector<double> &rhs_and_solution,
-                           bool                 transpose /*=false*/)
+                           const bool           transpose /*=false*/)
 {
   factorize(matrix);
   solve(rhs_and_solution, transpose);
@@ -392,7 +392,7 @@ SparseDirectUMFPACK::factorize(const Matrix &)
 
 
 void
-SparseDirectUMFPACK::solve(Vector<double> &, bool) const
+SparseDirectUMFPACK::solve(Vector<double> &, const bool) const
 {
   AssertThrow(
     false,
@@ -403,7 +403,7 @@ SparseDirectUMFPACK::solve(Vector<double> &, bool) const
 
 
 void
-SparseDirectUMFPACK::solve(BlockVector<double> &, bool) const
+SparseDirectUMFPACK::solve(BlockVector<double> &, const bool) const
 {
   AssertThrow(
     false,
@@ -414,7 +414,7 @@ SparseDirectUMFPACK::solve(BlockVector<double> &, bool) const
 
 template <class Matrix>
 void
-SparseDirectUMFPACK::solve(const Matrix &, Vector<double> &, bool)
+SparseDirectUMFPACK::solve(const Matrix &, Vector<double> &, const bool)
 {
   AssertThrow(
     false,
@@ -426,7 +426,7 @@ SparseDirectUMFPACK::solve(const Matrix &, Vector<double> &, bool)
 
 template <class Matrix>
 void
-SparseDirectUMFPACK::solve(const Matrix &, BlockVector<double> &, bool)
+SparseDirectUMFPACK::solve(const Matrix &, BlockVector<double> &, const bool)
 {
   AssertThrow(
     false,

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.