From: David Pecoraro <pecoraro27@gmail.com>
Date: Mon, 12 Aug 2024 22:54:54 +0000 (-0600)
Subject: Fixed error in attribute placement
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=499c23fdf8bc7fa4efd11230e55c0f493de8e0ae;p=dealii.git

Fixed error in attribute placement
---

diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc
index 375480a289..af79486d38 100644
--- a/source/distributed/tria.cc
+++ b/source/distributed/tria.cc
@@ -4286,10 +4286,10 @@ namespace parallel
     template <int dim, int spacedim>
     TemporarilyMatchRefineFlags<dim, spacedim>::TemporarilyMatchRefineFlags(
       dealii::Triangulation<dim, spacedim> &tria)
-      :
-      [[maybe_unused]] distributed_tria(
-        dynamic_cast<
-          dealii::parallel::distributed::Triangulation<dim, spacedim> *>(&tria))
+      : distributed_tria(
+          dynamic_cast<
+            dealii::parallel::distributed::Triangulation<dim, spacedim> *>(
+            &tria))
     {
 #ifdef DEAL_II_WITH_P4EST
       if (distributed_tria != nullptr)
@@ -4352,6 +4352,9 @@ namespace parallel
           distributed_tria->load_coarsen_flags(saved_coarsen_flags);
           distributed_tria->load_refine_flags(saved_refine_flags);
         }
+#else
+      // pretend that this destructor does something to silence clang-tidy
+      (void)distributed_tria;
 #endif
     }
   } // namespace distributed