From: Jerett Cherry Date: Tue, 13 Aug 2024 15:06:19 +0000 (-0600) Subject: indent and add [[maybe_unused]] to parameter list X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17509%2Fhead;p=dealii.git indent and add [[maybe_unused]] to parameter list --- 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); }