Fixed warnings regarding enums.

This commit is contained in:
Hauke Heibel 2010-06-12 13:24:02 +02:00
parent 03331552a9
commit 340ac9ea9d
4 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@ class DenseStorageBase : public ei_dense_xpr_base<Derived>::type
public: public:
enum { NeedsToAlign = (!(Options&DontAlign)) enum { NeedsToAlign = (!(Options&DontAlign))
&& SizeAtCompileTime!=Dynamic && ((sizeof(Scalar)*SizeAtCompileTime)%16)==0 }; && SizeAtCompileTime!=Dynamic && ((static_cast<int>(sizeof(Scalar))*SizeAtCompileTime)%16)==0 };
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
Base& base() { return *static_cast<Base*>(this); } Base& base() { return *static_cast<Base*>(this); }

View File

@ -94,7 +94,7 @@ struct ei_traits<Map<PlainObjectType, MapOptions, StrideType> >
&& ( bool(IsDynamicSize) && ( bool(IsDynamicSize)
|| HasNoOuterStride || HasNoOuterStride
|| ( OuterStrideAtCompileTime!=Dynamic || ( OuterStrideAtCompileTime!=Dynamic
&& ((int(OuterStrideAtCompileTime)*sizeof(Scalar))%16)==0 ) ), && ((static_cast<int>(sizeof(Scalar))*OuterStrideAtCompileTime)%16)==0 ) ),
Flags0 = ei_traits<PlainObjectType>::Flags, Flags0 = ei_traits<PlainObjectType>::Flags,
Flags1 = IsAligned ? int(Flags0) | AlignedBit : int(Flags0) & ~AlignedBit, Flags1 = IsAligned ? int(Flags0) | AlignedBit : int(Flags0) & ~AlignedBit,
Flags2 = HasNoStride ? int(Flags1) : int(Flags1 & ~LinearAccessBit), Flags2 = HasNoStride ? int(Flags1) : int(Flags1 & ~LinearAccessBit),

View File

@ -146,7 +146,7 @@ class Matrix
typedef typename Base::PlainObject PlainObject; typedef typename Base::PlainObject PlainObject;
enum { NeedsToAlign = (!(Options&DontAlign)) enum { NeedsToAlign = (!(Options&DontAlign))
&& SizeAtCompileTime!=Dynamic && ((sizeof(Scalar)*SizeAtCompileTime)%16)==0 }; && SizeAtCompileTime!=Dynamic && ((static_cast<int>(sizeof(Scalar))*SizeAtCompileTime)%16)==0 };
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
using Base::base; using Base::base;

View File

@ -295,7 +295,7 @@ struct ei_inverse_impl : public ReturnByValue<ei_inverse_impl<MatrixType> >
template<typename Dest> inline void evalTo(Dest& dst) const template<typename Dest> inline void evalTo(Dest& dst) const
{ {
const int Size = EIGEN_ENUM_MIN(MatrixType::ColsAtCompileTime,Dest::ColsAtCompileTime); const int Size = EIGEN_PLAIN_ENUM_MIN(MatrixType::ColsAtCompileTime,Dest::ColsAtCompileTime);
ei_assert(( (Size<=1) || (Size>4) || (ei_extract_data(m_matrix)!=ei_extract_data(dst))) ei_assert(( (Size<=1) || (Size>4) || (ei_extract_data(m_matrix)!=ei_extract_data(dst)))
&& "Aliasing problem detected in inverse(), you need to do inverse().eval() here."); && "Aliasing problem detected in inverse(), you need to do inverse().eval() here.");