mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +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.
|
||||
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(numerator >= 0);
|
||||
//eigen_assert(numerator >= 0); // this is implicitly asserted by the line above
|
||||
|
||||
UnsignedType t1 = muluh(multiplier, numerator);
|
||||
UnsignedType t = (static_cast<UnsignedType>(numerator) - t1) >> shift1;
|
||||
|
@ -29,8 +29,8 @@ void alignedvector3()
|
||||
typedef Matrix<Scalar,3,3> Mat33;
|
||||
typedef AlignedVector3<Scalar> FastType;
|
||||
RefType r1(RefType::Random()), r2(RefType::Random()), r3(RefType::Random()),
|
||||
r4(RefType::Random()), r5(RefType::Random()), r6(RefType::Random());
|
||||
FastType f1(r1), f2(r2), f3(r3), f4(r4), f5(r5), f6(r6);
|
||||
r4(RefType::Random()), r5(RefType::Random());
|
||||
FastType f1(r1), f2(r2), f3(r3), f4(r4), f5(r5);
|
||||
Mat33 m1(Mat33::Random());
|
||||
|
||||
VERIFY_IS_APPROX(f1,r1);
|
||||
|
@ -334,10 +334,10 @@ public:
|
||||
|
||||
#if defined (MPREAL_HAVE_EXPLICIT_CONVERTERS)
|
||||
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 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 long () const { return toULong(); }
|
||||
explicit operator float () const { return toFloat(); }
|
||||
|
Loading…
Reference in New Issue
Block a user