mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
introduce a new macro EIGEN_ARG_UNUSED(arg) and use it in some places to
silent some warnings (from clang)
This commit is contained in:
@@ -214,6 +214,9 @@ template<typename Derived> class DenseBase
|
||||
*/
|
||||
void resize(int size)
|
||||
{
|
||||
#ifdef EIGEN_NO_DEBUG
|
||||
EIGEN_ARG_UNUSED(size);
|
||||
#endif
|
||||
ei_assert(size == this->size()
|
||||
&& "DenseBase::resize() does not actually allow to resize.");
|
||||
}
|
||||
@@ -223,6 +226,10 @@ template<typename Derived> class DenseBase
|
||||
*/
|
||||
void resize(int rows, int cols)
|
||||
{
|
||||
#ifdef EIGEN_NO_DEBUG
|
||||
EIGEN_ARG_UNUSED(rows);
|
||||
EIGEN_ARG_UNUSED(cols);
|
||||
#endif
|
||||
ei_assert(rows == this->rows() && cols == this->cols()
|
||||
&& "DenseBase::resize() does not actually allow to resize.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user