mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-02-23 18:20:47 +08:00
Fix a couple of warnings in unit tests.
This commit is contained in:
parent
7d8823c8b7
commit
9b9177f1ce
@ -152,6 +152,7 @@ template<typename ArrayType> void comparisons(const ArrayType& m)
|
|||||||
template<typename ArrayType> void array_real(const ArrayType& m)
|
template<typename ArrayType> void array_real(const ArrayType& m)
|
||||||
{
|
{
|
||||||
using std::abs;
|
using std::abs;
|
||||||
|
using std::sqrt;
|
||||||
typedef typename ArrayType::Index Index;
|
typedef typename ArrayType::Index Index;
|
||||||
typedef typename ArrayType::Scalar Scalar;
|
typedef typename ArrayType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
|
@ -31,7 +31,7 @@ template<typename QuatType> void check_slerp(const QuatType& q0, const QuatType&
|
|||||||
|
|
||||||
Scalar theta_tot = AA(q1*q0.inverse()).angle();
|
Scalar theta_tot = AA(q1*q0.inverse()).angle();
|
||||||
if(theta_tot>M_PI)
|
if(theta_tot>M_PI)
|
||||||
theta_tot = 2.*M_PI-theta_tot;
|
theta_tot = Scalar(2.*M_PI)-theta_tot;
|
||||||
for(Scalar t=0; t<=1.001; t+=0.1)
|
for(Scalar t=0; t<=1.001; t+=0.1)
|
||||||
{
|
{
|
||||||
QuatType q = q0.slerp(t,q1);
|
QuatType q = q0.slerp(t,q1);
|
||||||
|
@ -74,7 +74,8 @@ void test_jacobi()
|
|||||||
// complex<float> is really important to test as it is the only way to cover conjugation issues in certain unaligned paths
|
// complex<float> is really important to test as it is the only way to cover conjugation issues in certain unaligned paths
|
||||||
CALL_SUBTEST_6(( jacobi<MatrixXcf, float>(MatrixXcf(r,c)) ));
|
CALL_SUBTEST_6(( jacobi<MatrixXcf, float>(MatrixXcf(r,c)) ));
|
||||||
CALL_SUBTEST_6(( jacobi<MatrixXcf, std::complex<float> >(MatrixXcf(r,c)) ));
|
CALL_SUBTEST_6(( jacobi<MatrixXcf, std::complex<float> >(MatrixXcf(r,c)) ));
|
||||||
(void) r;
|
|
||||||
(void) c;
|
TEST_SET_BUT_UNUSED_VARIABLE(r);
|
||||||
|
TEST_SET_BUT_UNUSED_VARIABLE(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user