diff --git a/dune/fufem/assemblers/localassemblers/vvlaplaceassembler.hh b/dune/fufem/assemblers/localassemblers/vvlaplaceassembler.hh index 0fc310ccb627ec1276f777d48ff4469810f6c331..5a27f1394ad1e2cc585f8fce98dd35ad034a6348 100644 --- a/dune/fufem/assemblers/localassemblers/vvlaplaceassembler.hh +++ b/dune/fufem/assemblers/localassemblers/vvlaplaceassembler.hh @@ -35,13 +35,13 @@ class VVLaplaceAssembler : public LocalOperatorAssembler <GridType, TrialLocalFE : one_(one) {} - void indices(const Element& element DUNE_UNUSED, BoolMatrix& isNonZero, const TrialLocalFE& tFE DUNE_UNUSED, const AnsatzLocalFE& aFE DUNE_UNUSED) const + void indices([[maybe_unused]] const Element& element, BoolMatrix& isNonZero, [[maybe_unused]] const TrialLocalFE& tFE, [[maybe_unused]] const AnsatzLocalFE& aFE) const { isNonZero = true; } template <class BoundaryIterator> - void indices(const BoundaryIterator& it DUNE_UNUSED, BoolMatrix& isNonZero, const TrialLocalFE& tFE DUNE_UNUSED, const AnsatzLocalFE& aFE DUNE_UNUSED) const + void indices([[maybe_unused]] const BoundaryIterator& it, BoolMatrix& isNonZero, [[maybe_unused]] const TrialLocalFE& tFE, [[maybe_unused]] const AnsatzLocalFE& aFE) const { isNonZero = true; } diff --git a/dune/fufem/assemblers/localassemblers/vvmassassembler.hh b/dune/fufem/assemblers/localassemblers/vvmassassembler.hh index 2f8e14eac80baa693f9194159168705308929d64..63267afbec16c8689c33a3306afaf878810b9de0 100644 --- a/dune/fufem/assemblers/localassemblers/vvmassassembler.hh +++ b/dune/fufem/assemblers/localassemblers/vvmassassembler.hh @@ -32,13 +32,13 @@ class VVMassAssembler : public LocalOperatorAssembler < GridType, TrialLocalFE, : one_(one) {} - void indices(const Element& element DUNE_UNUSED, BoolMatrix& isNonZero, const TrialLocalFE& tFE DUNE_UNUSED, const AnsatzLocalFE& aFE DUNE_UNUSED) const + void indices([[maybe_unused]] const Element& element, BoolMatrix& isNonZero, [[maybe_unused]] const TrialLocalFE& tFE, [[maybe_unused]] const AnsatzLocalFE& aFE) const { isNonZero = true; } template <class BoundaryIterator> - void indices(const BoundaryIterator& it DUNE_UNUSED, BoolMatrix& isNonZero, const TrialLocalFE& tFE DUNE_UNUSED, const AnsatzLocalFE& aFE DUNE_UNUSED) const + void indices([[maybe_unused]] const BoundaryIterator& it, BoolMatrix& isNonZero, [[maybe_unused]] const TrialLocalFE& tFE, [[maybe_unused]] const AnsatzLocalFE& aFE) const { isNonZero = true; } diff --git a/dune/fufem/dunedataio.hh b/dune/fufem/dunedataio.hh index 8d086eb3799789cecd59e62d900772ddf472648f..45e760e00ceb1078b1e3700bb8cd6a3c8418857c 100644 --- a/dune/fufem/dunedataio.hh +++ b/dune/fufem/dunedataio.hh @@ -16,7 +16,7 @@ namespace serialization { * mark the use of the operator & that works both ways, << or >> , depending on the type of Archive. */ template <class Archive, class T, int n> -void serialize(Archive& ar, Dune::FieldVector<T,n>& fvec, const unsigned int version DUNE_UNUSED) +void serialize(Archive& ar, Dune::FieldVector<T,n>& fvec, [[maybe_unused]] const unsigned int version) { for (int i=0; i<n; ++i) ar & fvec[i]; @@ -26,7 +26,7 @@ void serialize(Archive& ar, Dune::FieldVector<T,n>& fvec, const unsigned int ver * two separate save() and load() functions later to be "unified" via boost::serialization::split_free (see below) */ template <class Archive, class BlockType> -void save(Archive& ar, const Dune::BlockVector<BlockType>& vec, const unsigned int version DUNE_UNUSED) +void save(Archive& ar, const Dune::BlockVector<BlockType>& vec, [[maybe_unused]] const unsigned int version) { size_t size = vec.size(); ar << size; @@ -35,7 +35,7 @@ void save(Archive& ar, const Dune::BlockVector<BlockType>& vec, const unsigned i } template <class Archive, class BlockType> -void load(Archive& ar, Dune::BlockVector<BlockType>& vec, const unsigned int version DUNE_UNUSED) +void load(Archive& ar, Dune::BlockVector<BlockType>& vec, [[maybe_unused]] const unsigned int version) { size_t size; ar >> size; diff --git a/dune/fufem/estimators/errorfractionmarking.hh b/dune/fufem/estimators/errorfractionmarking.hh index 739c8189a3990963d0b2b0f3fa515ce6a951eb27..76548c2a697e7f3e1d8bed56dfffc4b09d2bd818 100644 --- a/dune/fufem/estimators/errorfractionmarking.hh +++ b/dune/fufem/estimators/errorfractionmarking.hh @@ -35,7 +35,7 @@ class ErrorFractionMarkingStrategy //! Layout class for a all codim all geometry type mapper struct AllCodimLayout { - bool operator() (Dune::GeometryType gt DUNE_UNUSED, int) const { + bool operator() ([[maybe_unused]] Dune::GeometryType gt, int) const { return true; } }; diff --git a/dune/fufem/functions/portablegreymap.hh b/dune/fufem/functions/portablegreymap.hh index 8c91a6d70f5ba6a5792afca17a45c7ff87afaf87..dbdf723196cda05d50b0730c4cb55cacf84508ec 100644 --- a/dune/fufem/functions/portablegreymap.hh +++ b/dune/fufem/functions/portablegreymap.hh @@ -371,7 +371,7 @@ class PortableGreyMap: * \param x point (global coordinates) at which to evaluate the derivative * \param d will contain the derivative at x after return */ - virtual void evaluateDerivative(const DomainType& x DUNE_UNUSED, DerivativeType& d DUNE_UNUSED) const + virtual void evaluateDerivative([[maybe_unused]] const DomainType& x, [[maybe_unused]] DerivativeType& d) const { DUNE_THROW(Dune::NotImplemented, "Derivative not implemented"); } @@ -382,7 +382,7 @@ class PortableGreyMap: * \param x point in local coordinates at which to evaluate the derivative * \param d will contain the derivative at x after return */ - virtual void evaluateDerivativeLocal(const Element& e DUNE_UNUSED, const LocalDomainType& x DUNE_UNUSED, DerivativeType& d DUNE_UNUSED) const + virtual void evaluateDerivativeLocal([[maybe_unused]] const Element& e, [[maybe_unused]] const LocalDomainType& x, [[maybe_unused]] DerivativeType& d) const { DUNE_THROW(Dune::NotImplemented, "Derivative not implemented"); } diff --git a/dune/fufem/functionspacebases/q1nodalbasis.hh b/dune/fufem/functionspacebases/q1nodalbasis.hh index 86d1fcb65d4567e9729c79351124d5921963d303..129c7f21c2b17ce7fffd068c75f657bd29ad4860 100644 --- a/dune/fufem/functionspacebases/q1nodalbasis.hh +++ b/dune/fufem/functionspacebases/q1nodalbasis.hh @@ -55,7 +55,7 @@ class Q1NodalBasis : return gridview_.indexSet().size(dim); } - const LocalFiniteElement& getLocalFiniteElement(const Element& e DUNE_UNUSED) const + const LocalFiniteElement& getLocalFiniteElement([[maybe_unused]] const Element& e) const { return localFE_; } diff --git a/dune/fufem/functionspacebases/refinedp1nodalbasis.hh b/dune/fufem/functionspacebases/refinedp1nodalbasis.hh index c907f6383b31c6bd0ca9966ac9802c80536f854d..cc9e699d820466ddd205efedb8d53f3feb44c18a 100644 --- a/dune/fufem/functionspacebases/refinedp1nodalbasis.hh +++ b/dune/fufem/functionspacebases/refinedp1nodalbasis.hh @@ -55,7 +55,7 @@ class RefinedP1NodalBasis : mapper_.update(); } - const LocalFiniteElement& getLocalFiniteElement(const Element& e DUNE_UNUSED) const + const LocalFiniteElement& getLocalFiniteElement([[maybe_unused]] const Element& e) const { return fe_; } diff --git a/dune/fufem/test/boundarypatchtest.cc b/dune/fufem/test/boundarypatchtest.cc index e0564c6cf3678a80c6115ff05c29995396617c0a..6e3836103c572f3a7fa560f3f8d93a3b323e6f85 100644 --- a/dune/fufem/test/boundarypatchtest.cc +++ b/dune/fufem/test/boundarypatchtest.cc @@ -47,7 +47,7 @@ struct BoundaryPatchTestSuite // Test copy construction BP fooBoundary = boundary; - int c DUNE_UNUSED; + [[maybe_unused]] int c; c = fooBoundary.gridView().indexSet().size(0); // make the copy do something useful // Test assignment @@ -70,7 +70,7 @@ struct BoundaryPatchTestSuite // Test leaf copy construction BoundaryPatch<typename GridType::LeafGridView> leafBoundary(grid.leafGridView(), true); BoundaryPatch<typename GridType::LeafGridView> foo = leafBoundary; - int c DUNE_UNUSED; + [[maybe_unused]] int c; c = foo.gridView().indexSet().size(0); // make the copy do something useful