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

Replace DUNE_UNUSED by [[maybe_unused]]

parent a7b88403
No related branches found
No related tags found
No related merge requests found
Pipeline #38677 passed
......@@ -66,7 +66,7 @@ struct GenericVector
//! weave two vector blocks into each other e.g. [[u1...un][w1...wn]] --> [[u1 w1]...[un wn]]
template <class LVectorType, class RVectorType>
static void interlace(const LVectorType& lvec DUNE_UNUSED, RVectorType& rvec DUNE_UNUSED)
static void interlace([[maybe_unused]] const LVectorType& lvec, [[maybe_unused]] RVectorType& rvec)
{
DUNE_THROW(Dune::NotImplemented,"GenericVector::interlace not implemented for given VectorTypes");
}
......@@ -132,7 +132,7 @@ struct GenericVector
//! unweave two vectors previously interlaced e.g. [[u1 w1]...[un wn]] --> [[u1...un][w1...wn]]
template <class LVectorType, class RVectorType>
static void deinterlace(const LVectorType& lvec DUNE_UNUSED, RVectorType& rvec DUNE_UNUSED)
static void deinterlace([[maybe_unused]] const LVectorType& lvec, [[maybe_unused]] RVectorType& rvec)
{
DUNE_THROW(Dune::NotImplemented,"GenericVector::deinterlace not implemented for given VectorTypes");
}
......
......@@ -96,7 +96,7 @@ template<>
struct RecursiveGSStep<1>
{
template<class MType, class VType, class BVType>
static void apply(const MType& mat, const VType& rhs, const BVType& ignore, VType& x, int innerLoops DUNE_UNUSED)
static void apply(const MType& mat, const VType& rhs, const BVType& ignore, VType& x, [[maybe_unused]] int innerLoops)
{
typedef typename MType::block_type MBlock;
......
......@@ -24,11 +24,11 @@ class NullOperator
public:
RowDummy(): zero_(0){}
const BlockType& operator[](size_t i DUNE_UNUSED) const
const BlockType& operator[]([[maybe_unused]] size_t i) const
{
return zero_;
}
BlockType& operator[](size_t i DUNE_UNUSED)
BlockType& operator[]([[maybe_unused]] size_t i)
{
return zero_;
}
......@@ -60,7 +60,7 @@ class NullOperator
* Implements b += Nx and hence does nothing (N=0 !)
*/
template <class LVectorType, class RVectorType>
void umv(const LVectorType& x DUNE_UNUSED, RVectorType& b DUNE_UNUSED) const
void umv([[maybe_unused]] const LVectorType& x, [[maybe_unused]] RVectorType& b) const
{}
/** \brief transposed Matrix-Vector multiplication
......@@ -68,7 +68,7 @@ class NullOperator
* Implements b += N^tx and hence does nothing (N=0 !)
*/
template <class LVectorType, class RVectorType>
void umtv(const LVectorType& x DUNE_UNUSED, RVectorType& b DUNE_UNUSED) const
void umtv([[maybe_unused]] const LVectorType& x, [[maybe_unused]] RVectorType& b) const
{}
/** \brief Matrix-Vector multiplication with scalar multiplication
......@@ -76,7 +76,7 @@ class NullOperator
* Implements b += a*Nx and hence does nothing (N=0 !)
*/
template <class LVectorType, class RVectorType>
void usmv(const double a DUNE_UNUSED, const LVectorType& x DUNE_UNUSED, RVectorType& b DUNE_UNUSED) const
void usmv([[maybe_unused]] const double a, [[maybe_unused]] const LVectorType& x, [[maybe_unused]] RVectorType& b) const
{}
/** \brief transposed Matrix-Vector multiplication with scalar multiplication
......@@ -84,7 +84,7 @@ class NullOperator
* Implements b += a*N^tx and hence does nothing (N=0 !)
*/
template <class LVectorType, class RVectorType>
void usmtv(const double a DUNE_UNUSED, const LVectorType& x DUNE_UNUSED, RVectorType& b DUNE_UNUSED) const
void usmtv([[maybe_unused]] const double a, [[maybe_unused]] const LVectorType& x, [[maybe_unused]] RVectorType& b) const
{}
/** \brief Matrix-Vector multiplication
......@@ -92,25 +92,25 @@ class NullOperator
* Implements b = Nx and hence does nothing but set b=0 (N=0 !)
*/
template <class LVectorType, class RVectorType>
void mv(const LVectorType& x DUNE_UNUSED, RVectorType& b) const
void mv([[maybe_unused]] const LVectorType& x, RVectorType& b) const
{
b = 0.0;
}
//! random access operator
const RowDummy& operator[](size_t i DUNE_UNUSED) const
const RowDummy& operator[]([[maybe_unused]] size_t i) const
{
return rowDummy_;
}
//! random access operator
RowDummy& operator[](size_t i DUNE_UNUSED)
RowDummy& operator[]([[maybe_unused]] size_t i)
{
return rowDummy_;
}
//! return j-th diagonal entry
const block_type& diagonal(size_t i DUNE_UNUSED) const
const block_type& diagonal([[maybe_unused]] size_t i) const
{
return rowDummy_[0];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment