]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mark some input arguments as 'const'. 5111/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 19 Sep 2017 15:10:08 +0000 (09:10 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 19 Sep 2017 15:10:46 +0000 (09:10 -0600)
include/deal.II/fe/fe_update_flags.h

index 44d620a42aa12ddad6b1147efeb4bb2f8021e929..b883355dac867bddf3b98cc1361e3a7911181667 100644 (file)
@@ -242,7 +242,8 @@ enum UpdateFlags
  */
 template <class StreamType>
 inline
-StreamType &operator << (StreamType &s, UpdateFlags u)
+StreamType &operator << (StreamType &s,
+                         const UpdateFlags u)
 {
   s << " UpdateFlags|";
   if (u & update_values)                                  s << "values|";
@@ -281,7 +282,8 @@ StreamType &operator << (StreamType &s, UpdateFlags u)
  */
 inline
 UpdateFlags
-operator | (UpdateFlags f1, UpdateFlags f2)
+operator | (const UpdateFlags f1,
+            const UpdateFlags f2)
 {
   return static_cast<UpdateFlags> (
            static_cast<unsigned int> (f1) |
@@ -299,7 +301,8 @@ operator | (UpdateFlags f1, UpdateFlags f2)
  */
 inline
 UpdateFlags &
-operator |= (UpdateFlags &f1, UpdateFlags f2)
+operator |= (UpdateFlags &f1,
+             const UpdateFlags f2)
 {
   f1 = f1 | f2;
   return f1;
@@ -317,7 +320,8 @@ operator |= (UpdateFlags &f1, UpdateFlags f2)
  */
 inline
 UpdateFlags
-operator & (UpdateFlags f1, UpdateFlags f2)
+operator & (const UpdateFlags f1,
+            const UpdateFlags f2)
 {
   return static_cast<UpdateFlags> (
            static_cast<unsigned int> (f1) &
@@ -333,7 +337,8 @@ operator & (UpdateFlags f1, UpdateFlags f2)
  */
 inline
 UpdateFlags &
-operator &= (UpdateFlags &f1, UpdateFlags f2)
+operator &= (UpdateFlags &f1,
+             const UpdateFlags f2)
 {
   f1 = f1 & f2;
   return f1;

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.