]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make some function arguments 'const'. 5121/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 21 Sep 2017 15:46:06 +0000 (09:46 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 21 Sep 2017 15:46:06 +0000 (09:46 -0600)
include/deal.II/grid/grid_tools_cache_update_flags.h

index b91ffcd0af4a3394f31e1496054211cf5a56b57b..39bfd67f792fd301d6e647fd330675cf233fcb0e 100644 (file)
@@ -70,7 +70,8 @@ namespace GridTools
    */
   template <class StreamType>
   inline
-  StreamType &operator << (StreamType &s, CacheUpdateFlags u)
+  StreamType &operator << (StreamType &s,
+                           const CacheUpdateFlags u)
   {
     s << " CacheUpdateFlags";
     if (u & update_vertex_to_cell_map)                 s << "|vertex_to_cell_map";
@@ -93,7 +94,8 @@ namespace GridTools
    */
   inline
   CacheUpdateFlags
-  operator | (CacheUpdateFlags f1, CacheUpdateFlags f2)
+  operator | (const CacheUpdateFlags f1,
+              const CacheUpdateFlags f2)
   {
     return static_cast<CacheUpdateFlags> (
              static_cast<unsigned int> (f1) |
@@ -111,7 +113,7 @@ namespace GridTools
    */
   inline
   CacheUpdateFlags
-  operator ~ (CacheUpdateFlags f1)
+  operator ~ (const CacheUpdateFlags f1)
   {
     return static_cast<CacheUpdateFlags> (
              ~static_cast<unsigned int> (f1)
@@ -128,7 +130,8 @@ namespace GridTools
    */
   inline
   CacheUpdateFlags &
-  operator |= (CacheUpdateFlags &f1, CacheUpdateFlags f2)
+  operator |= (CacheUpdateFlags &f1,
+               const CacheUpdateFlags f2)
   {
     f1 = f1 | f2;
     return f1;
@@ -146,7 +149,8 @@ namespace GridTools
    */
   inline
   CacheUpdateFlags
-  operator & (CacheUpdateFlags f1, CacheUpdateFlags f2)
+  operator & (const CacheUpdateFlags f1,
+              const CacheUpdateFlags f2)
   {
     return static_cast<CacheUpdateFlags> (
              static_cast<unsigned int> (f1) &
@@ -162,7 +166,8 @@ namespace GridTools
    */
   inline
   CacheUpdateFlags &
-  operator &= (CacheUpdateFlags &f1, CacheUpdateFlags f2)
+  operator &= (CacheUpdateFlags &f1,
+               const CacheUpdateFlags 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.