From: Mohamad Ghadban Date: Mon, 12 Aug 2024 20:51:08 +0000 (-0600) Subject: replace (void) casts with [[maybe_unused]] X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57a086a0dd47b2dd2bd9dec8462ba2b3462b9616;p=dealii.git replace (void) casts with [[maybe_unused]] --- diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index bf1dad3ccd..4de0b3e63b 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -2603,10 +2603,9 @@ namespace Functions template double InterpolatedTensorProductGridData::value( - const Point &p, - const unsigned int component) const + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; Assert( component == 0, ExcMessage( @@ -2634,10 +2633,9 @@ namespace Functions template Tensor<1, dim> InterpolatedTensorProductGridData::gradient( - const Point &p, - const unsigned int component) const + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; Assert( component == 0, ExcMessage( @@ -2712,10 +2710,10 @@ namespace Functions template double - InterpolatedUniformGridData::value(const Point &p, - const unsigned int component) const + InterpolatedUniformGridData::value( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; Assert( component == 0, ExcMessage( @@ -2761,10 +2759,10 @@ namespace Functions template Tensor<1, dim> - InterpolatedUniformGridData::gradient(const Point &p, - const unsigned int component) const + InterpolatedUniformGridData::gradient( + const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; Assert( component == 0, ExcMessage( @@ -2850,10 +2848,9 @@ namespace Functions template double - Polynomial::value(const Point &p, - const unsigned int component) const + Polynomial::value(const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); double sum = 0; @@ -2892,10 +2889,9 @@ namespace Functions template Tensor<1, dim> - Polynomial::gradient(const Point &p, - const unsigned int component) const + Polynomial::gradient(const Point &p, + [[maybe_unused]] const unsigned int component) const { - (void)component; AssertIndexRange(component, 1); Tensor<1, dim> r;