Skip to content
Snippets Groups Projects
Commit ece7cd30 authored by Patrick Jaap's avatar Patrick Jaap
Browse files

Replace DUNE_UNUSED by [[maybe_unused]]

parent 2a0e5163
No related branches found
No related tags found
1 merge request!92Perform tests also for Dune 2.7
...@@ -35,13 +35,13 @@ class VVLaplaceAssembler : public LocalOperatorAssembler <GridType, TrialLocalFE ...@@ -35,13 +35,13 @@ class VVLaplaceAssembler : public LocalOperatorAssembler <GridType, TrialLocalFE
: one_(one) : 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; isNonZero = true;
} }
template <class BoundaryIterator> 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; isNonZero = true;
} }
......
...@@ -32,13 +32,13 @@ class VVMassAssembler : public LocalOperatorAssembler < GridType, TrialLocalFE, ...@@ -32,13 +32,13 @@ class VVMassAssembler : public LocalOperatorAssembler < GridType, TrialLocalFE,
: one_(one) : 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; isNonZero = true;
} }
template <class BoundaryIterator> 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; isNonZero = true;
} }
......
...@@ -16,7 +16,7 @@ namespace serialization { ...@@ -16,7 +16,7 @@ namespace serialization {
* mark the use of the operator & that works both ways, << or >> , depending on the type of Archive. * mark the use of the operator & that works both ways, << or >> , depending on the type of Archive.
*/ */
template <class Archive, class T, int n> 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) for (int i=0; i<n; ++i)
ar & fvec[i]; ar & fvec[i];
...@@ -26,7 +26,7 @@ void serialize(Archive& ar, Dune::FieldVector<T,n>& fvec, const unsigned int ver ...@@ -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) * two separate save() and load() functions later to be "unified" via boost::serialization::split_free (see below)
*/ */
template <class Archive, class BlockType> 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(); size_t size = vec.size();
ar << size; ar << size;
...@@ -35,7 +35,7 @@ void save(Archive& ar, const Dune::BlockVector<BlockType>& vec, const unsigned i ...@@ -35,7 +35,7 @@ void save(Archive& ar, const Dune::BlockVector<BlockType>& vec, const unsigned i
} }
template <class Archive, class BlockType> 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; size_t size;
ar >> size; ar >> size;
......
...@@ -35,7 +35,7 @@ class ErrorFractionMarkingStrategy ...@@ -35,7 +35,7 @@ class ErrorFractionMarkingStrategy
//! Layout class for a all codim all geometry type mapper //! Layout class for a all codim all geometry type mapper
struct AllCodimLayout { struct AllCodimLayout {
bool operator() (Dune::GeometryType gt DUNE_UNUSED, int) const { bool operator() ([[maybe_unused]] Dune::GeometryType gt, int) const {
return true; return true;
} }
}; };
......
...@@ -371,7 +371,7 @@ class PortableGreyMap: ...@@ -371,7 +371,7 @@ class PortableGreyMap:
* \param x point (global coordinates) at which to evaluate the derivative * \param x point (global coordinates) at which to evaluate the derivative
* \param d will contain the derivative at x after return * \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"); DUNE_THROW(Dune::NotImplemented, "Derivative not implemented");
} }
...@@ -382,7 +382,7 @@ class PortableGreyMap: ...@@ -382,7 +382,7 @@ class PortableGreyMap:
* \param x point in local coordinates at which to evaluate the derivative * \param x point in local coordinates at which to evaluate the derivative
* \param d will contain the derivative at x after return * \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"); DUNE_THROW(Dune::NotImplemented, "Derivative not implemented");
} }
......
...@@ -55,7 +55,7 @@ class Q1NodalBasis : ...@@ -55,7 +55,7 @@ class Q1NodalBasis :
return gridview_.indexSet().size(dim); 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_; return localFE_;
} }
......
...@@ -55,7 +55,7 @@ class RefinedP1NodalBasis : ...@@ -55,7 +55,7 @@ class RefinedP1NodalBasis :
mapper_.update(); mapper_.update();
} }
const LocalFiniteElement& getLocalFiniteElement(const Element& e DUNE_UNUSED) const const LocalFiniteElement& getLocalFiniteElement([[maybe_unused]] const Element& e) const
{ {
return fe_; return fe_;
} }
......
...@@ -47,7 +47,7 @@ struct BoundaryPatchTestSuite ...@@ -47,7 +47,7 @@ struct BoundaryPatchTestSuite
// Test copy construction // Test copy construction
BP fooBoundary = boundary; BP fooBoundary = boundary;
int c DUNE_UNUSED; [[maybe_unused]] int c;
c = fooBoundary.gridView().indexSet().size(0); // make the copy do something useful c = fooBoundary.gridView().indexSet().size(0); // make the copy do something useful
// Test assignment // Test assignment
...@@ -70,7 +70,7 @@ struct BoundaryPatchTestSuite ...@@ -70,7 +70,7 @@ struct BoundaryPatchTestSuite
// Test leaf copy construction // Test leaf copy construction
BoundaryPatch<typename GridType::LeafGridView> leafBoundary(grid.leafGridView(), true); BoundaryPatch<typename GridType::LeafGridView> leafBoundary(grid.leafGridView(), true);
BoundaryPatch<typename GridType::LeafGridView> foo = leafBoundary; 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 c = foo.gridView().indexSet().size(0); // make the copy do something useful
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment