]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make clear than this refers to the object pointer 18095/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 6 Feb 2025 16:17:15 +0000 (16:17 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 6 Feb 2025 16:17:15 +0000 (16:17 +0000)
include/deal.II/grid/reference_cell.h
source/fe/fe_system.cc
source/fe/mapping_q_cache.cc

index 4b0a7a357bb6f599de394bbf19fe269b6d5ce63e..8d29514a52a8a6cdf2834517f5c67f3c67d66a14 100644 (file)
@@ -3540,9 +3540,9 @@ ReferenceCell::get_combined_orientation(
           return o;
       }
 
-    // Do not use this in Assert because nvcc when using C++20 assumes that this
-    // is an integer and we get the following error: invalid type argument of
-    // unary '*' (have 'int')
+    // Do not use `this` in Assert because nvcc when using C++20 assumes that
+    // `this` is an integer and we get the following error: invalid type
+    // argument of unary '*' (have 'int')
     [[maybe_unused]] const auto &ref_cell = *this;
     Assert(false,
            (internal::NoPermutation<T>(ref_cell, vertices_0, vertices_1)));
index 04d982d2455f915e2b291414448b9b7f4b50aa1e..67aeb6365a2303df180ddceed5a222d5f3554bbb 100644 (file)
@@ -1799,8 +1799,9 @@ FESystem<dim, spacedim>::initialize(
       {
         const unsigned int base = this->system_to_base_table[i].first.first,
                            base_index = this->system_to_base_table[i].second;
-        // Do not use this in Assert because nvcc when using C++20 assumes that
-        // this is an integer and we get the following error: base operand of
+        // Do not use `this` in Assert because nvcc when using C++20 assumes
+        // that `this` is an integer and we get the following error: base
+        // operand of
         // '->' is not a pointer
         [[maybe_unused]] const unsigned int n_base_elements =
           this->n_base_elements();
@@ -1962,10 +1963,9 @@ FESystem<dim, spacedim>::initialize(
         {
           // the array into which we want to write should have the correct size
           // already.
-          // Do not use this in Assert because nvcc when using C++20 assumes
-          // that this is an integer and we get the following error: base
-          // operand of
-          // '->' is not a pointer
+          // Do not use `this` in Assert because nvcc when using C++20 assumes
+          // that `this` is an integer and we get the following error: base
+          // operand of '->' is not a pointer
           [[maybe_unused]] const unsigned int n_elements =
             this->adjust_quad_dof_index_for_face_orientation_table[face_no]
               .n_elements();
@@ -1996,13 +1996,12 @@ FESystem<dim, spacedim>::initialize(
                   index += temp.size(0);
                 }
             }
-          // error: base operand of '->' is not a pointer
           Assert(index == n_dofs_per_quad, ExcInternalError());
         }
 
       // additionally compose the permutation information for lines
-      // Do not use this in Assert because nvcc when using C++20 assumes that
-      // this is an integer and we get the following error: base operand of
+      // Do not use `this` in Assert because nvcc when using C++20 assumes that
+      // `this` is an integer and we get the following error: base operand of
       // '->' is not a pointer
       [[maybe_unused]] const unsigned int table_size =
         this->adjust_line_dof_index_for_line_orientation_table.size();
index b6ed5e1271bc75b2ab11f4becc3f4f87bba19d80..1682bb7696191a637986a0124c3178f7be3e8db3 100644 (file)
@@ -159,8 +159,8 @@ MappingQCache<dim, spacedim>::initialize(
         void *) {
       (*support_point_cache)[cell->level()][cell->index()] =
         compute_points_on_cell(cell);
-      // Do not use this in Assert because nvcc when using C++20 assumes that
-      // this is an integer and we get the following error: invalid type
+      // Do not use `this` in Assert because nvcc when using C++20 assumes that
+      // `this` is an integer and we get the following error: invalid type
       // argument of unary '*' (have 'int')
       [[maybe_unused]] const unsigned int d = this->get_degree() + 1;
       AssertDimension(

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.