From a82d06ab23b36b2b4d13059c503ad93133a168c1 Mon Sep 17 00:00:00 2001 From: Jerett Cherry Date: Tue, 13 Aug 2024 09:06:19 -0600 Subject: [PATCH] indent and add [[maybe_unused]] to parameter list --- source/base/function_lib.cc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index 90d7b90c7c..288d43ffcb 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -1938,10 +1938,10 @@ namespace Functions template double - FourierCosineFunction::value(const Point &p, - const unsigned int component) const + FourierCosineFunction::value( + const Point &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 Tensor<1, dim> - FourierCosineFunction::gradient(const Point &p, - const unsigned int component) const + FourierCosineFunction::gradient( + const Point &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 double - FourierCosineFunction::laplacian(const Point &p, - const unsigned int component) const + FourierCosineFunction::laplacian( + const Point &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 double - FourierSineFunction::value(const Point &p, - const unsigned int component) const + FourierSineFunction::value( + const Point &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 Tensor<1, dim> - FourierSineFunction::gradient(const Point &p, - const unsigned int component) const + FourierSineFunction::gradient( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - [[maybe_unused]]component; AssertIndexRange(component, 1); return fourier_coefficients * std::cos(fourier_coefficients * p); } -- 2.39.5