]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make use of [[maybe_unused]] instead of (void) (first 5 occurrences)
authorFernando Herrera <cafeherval@gmail.com>
Mon, 12 Aug 2024 20:49:35 +0000 (14:49 -0600)
committerRene Gassmoeller <rene.gassmoeller@mailbox.org>
Tue, 27 Aug 2024 14:44:44 +0000 (16:44 +0200)
source/grid/tria.cc

index fc9273c845d63dcddcca4c49bc0587f203170a2a..3b4287380887b81da635955d6147f0d8c8037c3a 100644 (file)
@@ -669,10 +669,10 @@ namespace internal
   template <int dim, int spacedim>
   DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
   void CellAttachedDataSerializer<dim, spacedim>::save(
-    const unsigned int global_first_cell,
-    const unsigned int global_num_cells,
-    const std::string &file_basename,
-    const MPI_Comm    &mpi_communicator) const
+    [[maybe_unused]] const unsigned int global_first_cell,
+    [[maybe_unused]] const unsigned int global_num_cells,
+    const std::string                  &file_basename,
+    [[maybe_unused]] const MPI_Comm    &mpi_communicator) const
   {
     Assert(sizes_fixed_cumulative.size() > 0,
            ExcMessage("No data has been packed!"));
@@ -848,10 +848,6 @@ namespace internal
     else
 #endif
       {
-        (void)global_first_cell;
-        (void)global_num_cells;
-        (void)mpi_communicator;
-
         //
         // ---------- Fixed size data ----------
         //
@@ -900,13 +896,13 @@ namespace internal
   template <int dim, int spacedim>
   DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
   void CellAttachedDataSerializer<dim, spacedim>::load(
-    const unsigned int global_first_cell,
-    const unsigned int global_num_cells,
-    const unsigned int local_num_cells,
-    const std::string &file_basename,
-    const unsigned int n_attached_deserialize_fixed,
-    const unsigned int n_attached_deserialize_variable,
-    const MPI_Comm    &mpi_communicator)
+    [[maybe_unused]] const unsigned int global_first_cell,
+    [[maybe_unused]] const unsigned int global_num_cells,
+    const unsigned int                  local_num_cells,
+    const std::string                  &file_basename,
+    const unsigned int                  n_attached_deserialize_fixed,
+    const unsigned int                  n_attached_deserialize_variable,
+    const MPI_Comm                     &mpi_communicator)
   {
     Assert(dest_data_fixed.empty(),
            ExcMessage("Previously loaded data has not been released yet!"));
@@ -1064,8 +1060,6 @@ namespace internal
 #endif
       {
         (void)mpi_communicator;
-        (void)global_first_cell;
-        (void)global_num_cells;
 
         //
         // ---------- Fixed size data ----------

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.