mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-08 22:21:49 +08:00
Fix -Wbitwise-instead-of-logical clang warning
& and | short-circuit, && and || don't. When both arguments to those are boolean, the short-circuiting version is usually the desired one, so clang warns on this. Here, it is inconsequential, so switch to && and || to suppress the warning. (cherry picked from commit b17bcddbca749f621040990a3efb840046315050)
This commit is contained in:
parent
962a596d21
commit
71320af66a
@ -78,14 +78,14 @@ template <typename HL, typename LL, typename HR, typename LR>
|
|||||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||||
bool operator == (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)
|
bool operator == (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)
|
||||||
{
|
{
|
||||||
return (lhs.high == rhs.high) & (lhs.low == rhs.low);
|
return (lhs.high == rhs.high) && (lhs.low == rhs.low);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename HL, typename LL, typename HR, typename LR>
|
template <typename HL, typename LL, typename HR, typename LR>
|
||||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||||
bool operator != (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)
|
bool operator != (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)
|
||||||
{
|
{
|
||||||
return (lhs.high != rhs.high) | (lhs.low != rhs.low);
|
return (lhs.high != rhs.high) || (lhs.low != rhs.low);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename HL, typename LL, typename HR, typename LR>
|
template <typename HL, typename LL, typename HR, typename LR>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user