aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-06-20 13:56:48 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-06-20 13:56:48 +0200
commit84aaef93bac733f1e9e670b38be9465e4816cfbd (patch)
treec34bb18a582f3192d86d7e23286df496c0312e64 /unsupported/Eigen/CXX11/src
parent6b33b29f00283ecb60389df0cca8729fe02f1b6c (diff)
parent368ea234066a14d9427fd59ab064e2c6d96ba723 (diff)
Merged in vanhoucke/eigen_vanhoucke (pull request PR-118)
Fix two small undefined behaviors caught by static analysis.
Diffstat (limited to 'unsupported/Eigen/CXX11/src')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h
index 108c45a32..1de6ce3b4 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h
@@ -58,7 +58,7 @@ struct TensorIntDivisor {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorIntDivisor(const T divider) {
const int N = 32;
eigen_assert(divider > 0);
- eigen_assert(divider <= (1<<(N-1)) - 1);
+ eigen_assert(divider <= (1U<<(N-1)) - 1);
// fast ln2
const int leading_zeros = count_leading_zeros(divider);