]> https://gitweb.dealii.org/ - dealii.git/commitdiff
marked potentially unused with [[maybe_unused]]
authorJason Landini <landinjm@umich.edu>
Mon, 12 Aug 2024 20:52:42 +0000 (16:52 -0400)
committerJason Landini <landinjm@umich.edu>
Mon, 12 Aug 2024 20:52:42 +0000 (16:52 -0400)
source/distributed/tria.cc

index c01fb051a998a543bb53e4e1cdd33aca6e1c7d45..0285bf3bc09922558cf033d011f5f43b863b071e 100644 (file)
@@ -313,9 +313,8 @@ namespace
                      vertex_touch_count.end(),
                      &connectivity->ctt_offset[1]);
 
-    const typename internal::p4est::types<dim>::locidx num_vtt =
+    [[maybe_unused]] const typename internal::p4est::types<dim>::locidx num_vtt =
       std::accumulate(vertex_touch_count.begin(), vertex_touch_count.end(), 0u);
-    (void)num_vtt;
     Assert(connectivity->ctt_offset[triangulation.n_vertices()] == num_vtt,
            ExcInternalError());
 
@@ -727,10 +726,9 @@ namespace
     typename internal::p4est::types<dim>::quadrant *quadrant,
     int /* rank_begin */,
     int /* rank_end */,
-    void * /* this is always nullptr */ point)
+    [[maybe_unused]] void * /* this is always nullptr */ point)
   {
     // point must be nullptr here
-    (void)point;
     Assert(point == nullptr, dealii::ExcInternalError());
 
     // we need the user pointer
@@ -1849,11 +1847,9 @@ namespace parallel
     template <int dim, int spacedim>
     DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
     void Triangulation<dim, spacedim>::create_triangulation(
-      const TriangulationDescription::Description<dim, spacedim>
+      [[maybe_unused]] const TriangulationDescription::Description<dim, spacedim>
         &construction_data)
     {
-      (void)construction_data;
-
       DEAL_II_ASSERT_UNREACHABLE();
     }
 
@@ -2081,9 +2077,8 @@ namespace parallel
         }
 
       // each cell should have been flagged `CellStatus::cell_will_persist`
-      for (const auto &cell_rel : this->local_cell_relations)
+      for ([[maybe_unused]] const auto &cell_rel : this->local_cell_relations)
         {
-          (void)cell_rel;
           Assert((cell_rel.second == // cell_status
                   CellStatus::cell_will_persist),
                  ExcInternalError());

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.