From: Crystal Farris Date: Tue, 13 Aug 2024 23:01:12 +0000 (-0500) Subject: Changed void cast to [[maybe_unused]] X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e0e7263e753fbf21a8e516533206c8398f787a1;p=dealii.git Changed void cast to [[maybe_unused]] --- diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index 9776a595a4..5698cfd282 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -2012,10 +2012,10 @@ namespace Functions template double - FourierSineFunction::laplacian(const Point &p, - const unsigned int component) const + FourierSineFunction::laplacian( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); return (fourier_coefficients * fourier_coefficients) * (-std::sin(fourier_coefficients * p)); @@ -2044,10 +2044,10 @@ namespace Functions template double - FourierSineSum::value(const Point &p, - const unsigned int component) const + FourierSineSum::value( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); const unsigned int n = weights.size(); @@ -2062,10 +2062,10 @@ namespace Functions template Tensor<1, dim> - FourierSineSum::gradient(const Point &p, - const unsigned int component) const + FourierSineSum::gradient( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); const unsigned int n = weights.size(); @@ -2080,10 +2080,10 @@ namespace Functions template double - FourierSineSum::laplacian(const Point &p, - const unsigned int component) const + FourierSineSum::laplacian( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); const unsigned int n = weights.size(); @@ -2118,10 +2118,10 @@ namespace Functions template double - FourierCosineSum::value(const Point &p, - const unsigned int component) const + FourierCosineSum::value( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); const unsigned int n = weights.size(); @@ -2136,10 +2136,10 @@ namespace Functions template Tensor<1, dim> - FourierCosineSum::gradient(const Point &p, - const unsigned int component) const + FourierCosineSum::gradient( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); const unsigned int n = weights.size(); @@ -2154,10 +2154,10 @@ namespace Functions template double - FourierCosineSum::laplacian(const Point &p, - const unsigned int component) const + FourierCosineSum::laplacian( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); const unsigned int n = weights.size(); @@ -2186,10 +2186,10 @@ namespace Functions template Number - Monomial::value(const Point &p, - const unsigned int component) const + Monomial::value( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, this->n_components); Number prod = 1; @@ -2222,10 +2222,10 @@ namespace Functions template Tensor<1, dim, Number> - Monomial::gradient(const Point &p, - const unsigned int component) const + Monomial::gradient( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); Tensor<1, dim> r;