]> https://gitweb.dealii.org/ - dealii.git/commitdiff
indent and add [[maybe_unused]] to parameter list 17509/head
authorJerett Cherry <jerett97@gmail.com>
Tue, 13 Aug 2024 15:06:19 +0000 (09:06 -0600)
committerJerett Cherry <jerett97@gmail.com>
Tue, 13 Aug 2024 15:06:19 +0000 (09:06 -0600)
source/base/function_lib.cc

index 90d7b90c7c8c5af6c31eb54f6fa3459b56e83576..288d43ffcb9913702f40899f23df15024b03fd8c 100644 (file)
@@ -1938,10 +1938,10 @@ namespace Functions
 
   template <int dim>
   double
-  FourierCosineFunction<dim>::value(const Point<dim>  &p,
-                                    const unsigned int component) const
+  FourierCosineFunction<dim>::value(
+    const Point<dim>                   &p,
+    [[maybe_unused]] const unsigned int component) const
   {
-    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return std::cos(fourier_coefficients * p);
   }
@@ -1950,10 +1950,10 @@ namespace Functions
 
   template <int dim>
   Tensor<1, dim>
-  FourierCosineFunction<dim>::gradient(const Point<dim>  &p,
-                                       const unsigned int component) const
+  FourierCosineFunction<dim>::gradient(
+    const Point<dim>                   &p,
+    [[maybe_unused]] const unsigned int component) const
   {
-    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return -fourier_coefficients * std::sin(fourier_coefficients * p);
   }
@@ -1962,10 +1962,10 @@ namespace Functions
 
   template <int dim>
   double
-  FourierCosineFunction<dim>::laplacian(const Point<dim>  &p,
-                                        const unsigned int component) const
+  FourierCosineFunction<dim>::laplacian(
+    const Point<dim>                   &p,
+    [[maybe_unused]] const unsigned int component) const
   {
-    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return (fourier_coefficients * fourier_coefficients) *
            (-std::cos(fourier_coefficients * p));
@@ -1988,10 +1988,10 @@ namespace Functions
 
   template <int dim>
   double
-  FourierSineFunction<dim>::value(const Point<dim>  &p,
-                                  const unsigned int component) const
+  FourierSineFunction<dim>::value(
+    const Point<dim>                   &p,
+    [[maybe_unused]] const unsigned int component) const
   {
-    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return std::sin(fourier_coefficients * p);
   }
@@ -2000,10 +2000,10 @@ namespace Functions
 
   template <int dim>
   Tensor<1, dim>
-  FourierSineFunction<dim>::gradient(const Point<dim>  &p,
-                                     const unsigned int component) const
+  FourierSineFunction<dim>::gradient(
+    const Point<dim>                   &p,
+    [[maybe_unused]] const unsigned int component) const
   {
-    [[maybe_unused]]component;
     AssertIndexRange(component, 1);
     return fourier_coefficients * std::cos(fourier_coefficients * p);
   }

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.