From 33f08ff39b493b5ee4dca3c98ddfb9643415b2a8 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Tue, 16 Nov 2021 14:18:08 +0100 Subject: [PATCH] SimpleMath: fixed compile warnings when using debug builds --- 3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h b/3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h index 06cbcd2..ba4b56c 100644 --- a/3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h +++ b/3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h @@ -819,17 +819,19 @@ struct Storage { inline size_t cols() const { return NumCols; } - void resize(int UNUSED(num_rows), int UNUSED(num_cols)) { +#ifdef NDEBUG + void resize(int UNUSED(num_rows), int UNUSED(num_cols)) {} +#else + void resize(int num_rows, int num_cols) { // Resizing of fixed size matrices not allowed - #ifndef NDEBUG if (num_rows != NumRows || num_cols != NumCols) { std::cout << "Error: trying to resize fixed matrix from " << NumRows << ", " << NumCols << " to " << num_rows << ", " << num_cols << "." << std::endl; } - #endif assert (num_rows == NumRows && num_cols == NumCols); } +#endif inline ScalarType& coeff(int row_index, int col_index) { // assert (row_index >= 0 && row_index <= NumRows);