mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-09 18:29:03 +08:00
Fix deprecated anonymous enum-enum conversion warnings
This commit is contained in:
parent
55dd487478
commit
5ffb307afa
@ -30,7 +30,7 @@ struct traits<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>> {
|
||||
actual_alignment = ((Options_ & DontAlign) == 0) ? default_alignment : 0,
|
||||
required_alignment = unpacket_traits<PacketScalar>::alignment,
|
||||
packet_access_bit = (packet_traits<Scalar_>::Vectorizable &&
|
||||
(EIGEN_UNALIGNED_VECTORIZE || (actual_alignment >= required_alignment)))
|
||||
(EIGEN_UNALIGNED_VECTORIZE || (int(actual_alignment) >= int(required_alignment))))
|
||||
? PacketAccessBit
|
||||
: 0
|
||||
};
|
||||
@ -48,7 +48,7 @@ struct traits<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>> {
|
||||
Flags = compute_matrix_flags(Options_),
|
||||
Options = Options_,
|
||||
InnerStrideAtCompileTime = 1,
|
||||
OuterStrideAtCompileTime = (Options & RowMajor) ? ColsAtCompileTime : RowsAtCompileTime,
|
||||
OuterStrideAtCompileTime = (int(Options) & int(RowMajor)) ? ColsAtCompileTime : RowsAtCompileTime,
|
||||
|
||||
// FIXME, the following flag in only used to define NeedsToAlign in PlainObjectBase
|
||||
EvaluatorFlags = LinearAccessBit | DirectAccessBit | packet_access_bit | row_major_bit,
|
||||
|
@ -184,7 +184,8 @@ class TriangularView
|
||||
enum {
|
||||
Mode = Mode_,
|
||||
Flags = internal::traits<TriangularView>::Flags,
|
||||
TransposeMode = (Mode & Upper ? Lower : 0) | (Mode & Lower ? Upper : 0) | (Mode & (UnitDiag)) | (Mode & (ZeroDiag)),
|
||||
TransposeMode = (int(Mode) & int(Upper) ? Lower : 0) | (int(Mode) & int(Lower) ? Upper : 0) |
|
||||
(int(Mode) & int(UnitDiag)) | (int(Mode) & int(ZeroDiag)),
|
||||
IsVectorAtCompileTime = false
|
||||
};
|
||||
|
||||
|
@ -484,7 +484,7 @@ struct nested_eval {
|
||||
// solution could be to count the number of temps?
|
||||
NAsInteger = n == Dynamic ? HugeCost : n,
|
||||
CostEval = (NAsInteger + 1) * ScalarReadCost + CoeffReadCost,
|
||||
CostNoEval = NAsInteger * CoeffReadCost,
|
||||
CostNoEval = int(NAsInteger) * int(CoeffReadCost),
|
||||
Evaluate = (int(evaluator<T>::Flags) & EvalBeforeNestingBit) || (int(CostEval) < int(CostNoEval))
|
||||
};
|
||||
|
||||
|
@ -53,7 +53,7 @@ class SparseSelfAdjointView : public EigenBase<SparseSelfAdjointView<MatrixType,
|
||||
public:
|
||||
enum {
|
||||
Mode = Mode_,
|
||||
TransposeMode = ((Mode & Upper) ? Lower : 0) | ((Mode & Lower) ? Upper : 0),
|
||||
TransposeMode = ((int(Mode) & int(Upper)) ? Lower : 0) | ((int(Mode) & int(Lower)) ? Upper : 0),
|
||||
RowsAtCompileTime = internal::traits<SparseSelfAdjointView>::RowsAtCompileTime,
|
||||
ColsAtCompileTime = internal::traits<SparseSelfAdjointView>::ColsAtCompileTime
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user