mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Made the supression of unused variables portable.
EIGEN_UNUSED is not supported on non GCC systems.
This commit is contained in:
@@ -34,9 +34,8 @@ void test_first_aligned_helper(Scalar *array, int size)
|
||||
template<typename Scalar>
|
||||
void test_none_aligned_helper(Scalar *array, int size)
|
||||
{
|
||||
// Suppress 'unreferenced formal parameter's warnings.
|
||||
(void)array;
|
||||
(void)size;
|
||||
EIGEN_UNUSED_VARIABLE(array);
|
||||
EIGEN_UNUSED_VARIABLE(size);
|
||||
VERIFY(ei_packet_traits<Scalar>::size == 1 || ei_first_aligned(array, size) == size);
|
||||
}
|
||||
|
||||
|
||||
@@ -235,8 +235,8 @@ void test_triangular()
|
||||
{
|
||||
for(int i = 0; i < g_repeat ; i++)
|
||||
{
|
||||
EIGEN_UNUSED int r = ei_random<int>(2,20);
|
||||
EIGEN_UNUSED int c = ei_random<int>(2,20);
|
||||
int r = ei_random<int>(2,20); EIGEN_UNUSED_VARIABLE(r);
|
||||
int c = ei_random<int>(2,20); EIGEN_UNUSED_VARIABLE(c);
|
||||
|
||||
CALL_SUBTEST_1( triangular_square(Matrix<float, 1, 1>()) );
|
||||
CALL_SUBTEST_2( triangular_square(Matrix<float, 2, 2>()) );
|
||||
|
||||
Reference in New Issue
Block a user