Merge pull request #4025 from bska/remove-dune-unused

Prefer Attributes to Macros
This commit is contained in:
Atgeirr Flø Rasmussen 2022-08-25 08:29:33 +02:00 committed by GitHub
commit 432df26ecc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 11 deletions

View File

@ -966,9 +966,8 @@ namespace Dune
/** \copydoc Preconditioner::post */
template<class M, class X, class S, class PI, class A>
void AMGCPR<M,X,S,PI,A>::post(Domain& x)
void AMGCPR<M,X,S,PI,A>::post([[maybe_unused]] Domain& x)
{
DUNE_UNUSED_PARAMETER(x);
// Postprocess all smoothers
typedef typename Hierarchy<Smoother,A>::Iterator Iterator;
typedef typename Hierarchy<Domain,A>::Iterator DIterator;

View File

@ -284,10 +284,8 @@ private:
: amg_(op, crit,args), first_(true)
{}
void apply(X& x, X& b, double reduction, InverseOperatorResult& res)
void apply(X& x, X& b, [[maybe_unused]] double reduction, [[maybe_unused]] InverseOperatorResult& res)
{
DUNE_UNUSED_PARAMETER(reduction);
DUNE_UNUSED_PARAMETER(res);
if(first_)
{
amg_.pre(x,b);
@ -468,9 +466,8 @@ public:
smoother_->pre(x,b);
}
void post(FineDomainType& x)
void post([[maybe_unused]] FineDomainType& x)
{
DUNE_UNUSED_PARAMETER(x);
}
void apply(FineDomainType& v, const FineRangeType& d)

View File

@ -128,9 +128,8 @@ void setupPattern(int N, M& mat, Dune::ParallelIndexSet<G,L,s>& indices, int ove
}
template<class M, class T>
void fillValues(int N, M& mat, int overlapStart, int overlapEnd, int start, int end, T eps)
void fillValues([[maybe_unused]] int N, M& mat, int overlapStart, int overlapEnd, int start, int end, T eps)
{
DUNE_UNUSED_PARAMETER(N);
typedef typename M::block_type Block;
Block dval(0), bone(0), bmone(0), beps(0);
@ -319,8 +318,7 @@ bool init_unit_test_func()
int main(int argc, char** argv)
{
const auto& helper = Dune::MPIHelper::instance(argc, argv);
DUNE_UNUSED_PARAMETER(helper);
[[maybe_unused]] const auto& helper = Dune::MPIHelper::instance(argc, argv);
boost::unit_test::unit_test_main(&init_unit_test_func,
argc, argv);
}