]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mark input arguments as const.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 14 Nov 2012 03:12:26 +0000 (03:12 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 14 Nov 2012 03:12:26 +0000 (03:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@27531 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/meshworker/functional.h

index 8678e28f95de582cb6a7808d251d1b72aecab8b0..a7fce04ec75dcc740f2ded2a4ebd8adc9a769930 100644 (file)
@@ -47,7 +47,7 @@ namespace MeshWorker
                                           * number of functionals to
                                           * be computed.
                                           */
-        void initialize(unsigned int n);
+        void initialize(const unsigned int n);
                                          /**
                                           * Initialize the local data
                                           * in the DoFInfo object used
@@ -81,7 +81,7 @@ namespace MeshWorker
                                           * The value of the ith entry
                                           * in #results.
                                           */
-        number operator() (unsigned int i) const;
+        number operator() (const unsigned int i) const;
       private:
                                          /**
                                           * The values into which the
@@ -181,7 +181,7 @@ namespace MeshWorker
                                           * The value of the ith entry
                                           * in @p results.
                                           */
-        number operator() (unsigned int i) const;
+        number operator() (const unsigned int i) const;
       private:
         DataVectors results;
         bool separate_faces;
@@ -190,7 +190,7 @@ namespace MeshWorker
 
     template <typename number>
     inline void
-    Functional<number>::initialize(unsigned int n)
+    Functional<number>::initialize(const unsigned int n)
     {
       results.resize(n);
       std::fill(results.begin(), results.end(), 0.);
@@ -232,7 +232,7 @@ namespace MeshWorker
 
     template <typename number>
     inline number
-    Functional<number>::operator() (unsigned int i) const
+    Functional<number>::operator() (const unsigned int i) const
     {
       AssertIndexRange(i, results.size());
       return results[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.