mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 01:29:35 +08:00
Fix some trivial warnings
This commit is contained in:
parent
0721690dbb
commit
1bdd06a199
@ -149,7 +149,7 @@ struct TensorIntDivisor {
|
|||||||
// type numerator should also be less than 2^32-1.
|
// type numerator should also be less than 2^32-1.
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T divide(const T numerator) const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T divide(const T numerator) const {
|
||||||
eigen_assert(static_cast<typename UnsignedTraits<T>::type>(numerator) < NumTraits<UnsignedType>::highest()/2);
|
eigen_assert(static_cast<typename UnsignedTraits<T>::type>(numerator) < NumTraits<UnsignedType>::highest()/2);
|
||||||
eigen_assert(numerator >= 0);
|
//eigen_assert(numerator >= 0); // this is implicitly asserted by the line above
|
||||||
|
|
||||||
UnsignedType t1 = muluh(multiplier, numerator);
|
UnsignedType t1 = muluh(multiplier, numerator);
|
||||||
UnsignedType t = (static_cast<UnsignedType>(numerator) - t1) >> shift1;
|
UnsignedType t = (static_cast<UnsignedType>(numerator) - t1) >> shift1;
|
||||||
|
@ -29,8 +29,8 @@ void alignedvector3()
|
|||||||
typedef Matrix<Scalar,3,3> Mat33;
|
typedef Matrix<Scalar,3,3> Mat33;
|
||||||
typedef AlignedVector3<Scalar> FastType;
|
typedef AlignedVector3<Scalar> FastType;
|
||||||
RefType r1(RefType::Random()), r2(RefType::Random()), r3(RefType::Random()),
|
RefType r1(RefType::Random()), r2(RefType::Random()), r3(RefType::Random()),
|
||||||
r4(RefType::Random()), r5(RefType::Random()), r6(RefType::Random());
|
r4(RefType::Random()), r5(RefType::Random());
|
||||||
FastType f1(r1), f2(r2), f3(r3), f4(r4), f5(r5), f6(r6);
|
FastType f1(r1), f2(r2), f3(r3), f4(r4), f5(r5);
|
||||||
Mat33 m1(Mat33::Random());
|
Mat33 m1(Mat33::Random());
|
||||||
|
|
||||||
VERIFY_IS_APPROX(f1,r1);
|
VERIFY_IS_APPROX(f1,r1);
|
||||||
|
@ -334,10 +334,10 @@ public:
|
|||||||
|
|
||||||
#if defined (MPREAL_HAVE_EXPLICIT_CONVERTERS)
|
#if defined (MPREAL_HAVE_EXPLICIT_CONVERTERS)
|
||||||
explicit operator bool () const { return toBool(); }
|
explicit operator bool () const { return toBool(); }
|
||||||
explicit operator int () const { return toLong(); }
|
explicit operator int () const { return int(toLong()); }
|
||||||
explicit operator long () const { return toLong(); }
|
explicit operator long () const { return toLong(); }
|
||||||
explicit operator long long () const { return toLong(); }
|
explicit operator long long () const { return toLong(); }
|
||||||
explicit operator unsigned () const { return toULong(); }
|
explicit operator unsigned () const { return unsigned(toULong()); }
|
||||||
explicit operator unsigned long () const { return toULong(); }
|
explicit operator unsigned long () const { return toULong(); }
|
||||||
explicit operator unsigned long long () const { return toULong(); }
|
explicit operator unsigned long long () const { return toULong(); }
|
||||||
explicit operator float () const { return toFloat(); }
|
explicit operator float () const { return toFloat(); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user