From 55c7400db5f43c60ae8f9b475a296e897c05ddb3 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Wed, 2 Mar 2022 11:18:17 -0800 Subject: [PATCH] Fix enum conversion warnings in BooleanRedux. --- Eigen/src/Core/BooleanRedux.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Eigen/src/Core/BooleanRedux.h b/Eigen/src/Core/BooleanRedux.h index 8e1d9059f..3302634e2 100644 --- a/Eigen/src/Core/BooleanRedux.h +++ b/Eigen/src/Core/BooleanRedux.h @@ -20,7 +20,7 @@ template struct all_unroller { enum { - IsRowMajor = (Derived::Flags & RowMajor), + IsRowMajor = (int(Derived::Flags) & int(RowMajor)), i = (UnrollCount-1) / InnerSize, j = (UnrollCount-1) % InnerSize }; @@ -47,7 +47,7 @@ template struct any_unroller { enum { - IsRowMajor = (Derived::Flags & RowMajor), + IsRowMajor = (int(Derived::Flags) & int(RowMajor)), i = (UnrollCount-1) / InnerSize, j = (UnrollCount-1) % InnerSize }; @@ -86,7 +86,7 @@ EIGEN_DEVICE_FUNC inline bool DenseBase::all() const enum { unroll = SizeAtCompileTime != Dynamic && SizeAtCompileTime * (int(Evaluator::CoeffReadCost) + int(NumTraits::AddCost)) <= EIGEN_UNROLLING_LIMIT, - IsRowMajor = (internal::traits::Flags & RowMajor), + IsRowMajor = (int(internal::traits::Flags) & int(RowMajor)), InnerSizeAtCompileTime = IsRowMajor ? internal::traits::ColsAtCompileTime : internal::traits::RowsAtCompileTime }; Evaluator evaluator(derived()); @@ -112,7 +112,7 @@ EIGEN_DEVICE_FUNC inline bool DenseBase::any() const enum { unroll = SizeAtCompileTime != Dynamic && SizeAtCompileTime * (int(Evaluator::CoeffReadCost) + int(NumTraits::AddCost)) <= EIGEN_UNROLLING_LIMIT, - IsRowMajor = (internal::traits::Flags & RowMajor), + IsRowMajor = (int(internal::traits::Flags) & int(RowMajor)), InnerSizeAtCompileTime = IsRowMajor ? internal::traits::ColsAtCompileTime : internal::traits::RowsAtCompileTime }; Evaluator evaluator(derived());