mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
Fixed warnings regarding enums.
This commit is contained in:
parent
03331552a9
commit
340ac9ea9d
@ -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); }
|
||||||
|
@ -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),
|
||||||
|
@ -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;
|
||||||
|
@ -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.");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user