diff --git a/Eigen/src/Core/Assign.h b/Eigen/src/Core/Assign.h index b06d07d05..3a17152f0 100644 --- a/Eigen/src/Core/Assign.h +++ b/Eigen/src/Core/Assign.h @@ -41,7 +41,7 @@ public: DstIsAligned = Derived::Flags & AlignedBit, DstHasDirectAccess = Derived::Flags & DirectAccessBit, SrcIsAligned = OtherDerived::Flags & AlignedBit, - JointAlignment = DstIsAligned && SrcIsAligned ? Aligned : Unaligned + JointAlignment = bool(DstIsAligned) && bool(SrcIsAligned) ? Aligned : Unaligned }; private: @@ -106,9 +106,9 @@ public: : int(NoUnrolling) ) : int(Traversal) == int(LinearVectorizedTraversal) - ? ( int(MayUnrollCompletely) && int(DstIsAligned) ? int(CompleteUnrolling) : int(NoUnrolling) ) + ? ( bool(MayUnrollCompletely) && bool(DstIsAligned) ? int(CompleteUnrolling) : int(NoUnrolling) ) : int(Traversal) == int(LinearTraversal) - ? ( int(MayUnrollCompletely) ? int(CompleteUnrolling) : int(NoUnrolling) ) + ? ( bool(MayUnrollCompletely) ? int(CompleteUnrolling) : int(NoUnrolling) ) : int(NoUnrolling) }; diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h index 25febb773..f9f5a95d5 100644 --- a/Eigen/src/Core/Redux.h +++ b/Eigen/src/Core/Redux.h @@ -216,7 +216,7 @@ struct redux_impl const Index packetSize = packet_traits::size; const Index alignedStart = first_aligned(mat); enum { - alignment = (Derived::Flags & DirectAccessBit) || (Derived::Flags & AlignedBit) + alignment = bool(Derived::Flags & DirectAccessBit) || bool(Derived::Flags & AlignedBit) ? Aligned : Unaligned }; const Index alignedSize = ((size-alignedStart)/packetSize)*packetSize;