]> https://gitweb.dealii.org/ - dealii.git/commitdiff
replace (void) casts with [[maybe_unused]] 17489/head
authorMohamad Ghadban <mghadban@ualberta.ca>
Mon, 12 Aug 2024 20:51:08 +0000 (14:51 -0600)
committerMatthias Maier <tamiko@43-1.org>
Tue, 13 Aug 2024 03:13:28 +0000 (22:13 -0500)
source/base/function_lib.cc

index bf1dad3ccd31c84f4494553b092920715596a324..4de0b3e63b788ab47fbca978d6f12399e65a24ef 100644 (file)
@@ -2603,10 +2603,9 @@ namespace Functions
   template <int dim>
   double
   InterpolatedTensorProductGridData<dim>::value(
-    const Point<dim>  &p,
-    const unsigned int component) const
+    const Point<dim>                   &p,
+    [[maybe_unused]] const unsigned int component) const
   {
-    (void)component;
     Assert(
       component == 0,
       ExcMessage(
@@ -2634,10 +2633,9 @@ namespace Functions
   template <int dim>
   Tensor<1, dim>
   InterpolatedTensorProductGridData<dim>::gradient(
-    const Point<dim>  &p,
-    const unsigned int component) const
+    const Point<dim>                   &p,
+    [[maybe_unused]] const unsigned int component) const
   {
-    (void)component;
     Assert(
       component == 0,
       ExcMessage(
@@ -2712,10 +2710,10 @@ namespace Functions
 
   template <int dim>
   double
-  InterpolatedUniformGridData<dim>::value(const Point<dim>  &p,
-                                          const unsigned int component) const
+  InterpolatedUniformGridData<dim>::value(
+    const Point<dim>                   &p,
+    [[maybe_unused]] const unsigned int component) const
   {
-    (void)component;
     Assert(
       component == 0,
       ExcMessage(
@@ -2761,10 +2759,10 @@ namespace Functions
 
   template <int dim>
   Tensor<1, dim>
-  InterpolatedUniformGridData<dim>::gradient(const Point<dim>  &p,
-                                             const unsigned int component) const
+  InterpolatedUniformGridData<dim>::gradient(
+    const Point<dim>                   &p,
+    [[maybe_unused]] const unsigned int component) const
   {
-    (void)component;
     Assert(
       component == 0,
       ExcMessage(
@@ -2850,10 +2848,9 @@ namespace Functions
 
   template <int dim>
   double
-  Polynomial<dim>::value(const Point<dim>  &p,
-                         const unsigned int component) const
+  Polynomial<dim>::value(const Point<dim>                   &p,
+                         [[maybe_unused]] const unsigned int component) const
   {
-    (void)component;
     AssertIndexRange(component, 1);
 
     double sum = 0;
@@ -2892,10 +2889,9 @@ namespace Functions
 
   template <int dim>
   Tensor<1, dim>
-  Polynomial<dim>::gradient(const Point<dim>  &p,
-                            const unsigned int component) const
+  Polynomial<dim>::gradient(const Point<dim>                   &p,
+                            [[maybe_unused]] const unsigned int component) const
   {
-    (void)component;
     AssertIndexRange(component, 1);
 
     Tensor<1, dim> r;

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.