aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Robert Lukierski <robert@lukierski.eu>2016-10-12 18:59:05 +0100
committerGravatar Robert Lukierski <robert@lukierski.eu>2016-10-12 18:59:05 +0100
commit471075f7ad8e78d4d3e400bc1124e39102515aec (patch)
tree2c040cbd298ffd8be0598a73be613fe3e0848509
parent86711497c4584534793b186fb0c72f8002a9fe86 (diff)
Fixes min() warnings.
-rw-r--r--Eigen/src/Core/AssignEvaluator.h2
-rw-r--r--Eigen/src/Core/CwiseNullaryOp.h2
-rw-r--r--Eigen/src/Core/PlainObjectBase.h8
-rw-r--r--Eigen/src/Core/TriangularMatrix.h6
4 files changed, 9 insertions, 9 deletions
diff --git a/Eigen/src/Core/AssignEvaluator.h b/Eigen/src/Core/AssignEvaluator.h
index 30b36be11..844b85ab3 100644
--- a/Eigen/src/Core/AssignEvaluator.h
+++ b/Eigen/src/Core/AssignEvaluator.h
@@ -555,7 +555,7 @@ struct dense_assignment_loop<Kernel, SliceVectorizedTraversal, NoUnrolling>
for(Index inner = alignedEnd; inner<innerSize ; ++inner)
kernel.assignCoeffByOuterInner(outer, inner);
- alignedStart = min((Index)(alignedStart+alignedStep)%packetSize, (Index)innerSize);
+ alignedStart = (min)((Index)(alignedStart+alignedStep)%packetSize, (Index)innerSize);
}
}
};
diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h
index 4ab32d430..c47993e88 100644
--- a/Eigen/src/Core/CwiseNullaryOp.h
+++ b/Eigen/src/Core/CwiseNullaryOp.h
@@ -753,7 +753,7 @@ struct setIdentity_impl<Derived, true>
{
m.setZero();
EIGEN_USING_STD_MATH(min)
- const Index size = min(m.rows(), m.cols());
+ const Index size = (min)(m.rows(), m.cols());
for(Index i = 0; i < size; ++i) m.coeffRef(i,i) = typename Derived::Scalar(1);
return m;
}
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h
index 00313920c..a4ade63b8 100644
--- a/Eigen/src/Core/PlainObjectBase.h
+++ b/Eigen/src/Core/PlainObjectBase.h
@@ -917,8 +917,8 @@ struct conservative_resize_like_impl
// The storage order does not allow us to use reallocation.
typename Derived::PlainObject tmp(rows,cols);
EIGEN_USING_STD_MATH(min)
- const Index common_rows = min(rows, _this.rows());
- const Index common_cols = min(cols, _this.cols());
+ const Index common_rows = (min)(rows, _this.rows());
+ const Index common_cols = (min)(cols, _this.cols());
tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols);
_this.derived().swap(tmp);
}
@@ -952,8 +952,8 @@ struct conservative_resize_like_impl
// The storage order does not allow us to use reallocation.
typename Derived::PlainObject tmp(other);
EIGEN_USING_STD_MATH(min)
- const Index common_rows = min(tmp.rows(), _this.rows());
- const Index common_cols = min(tmp.cols(), _this.cols());
+ const Index common_rows = (min)(tmp.rows(), _this.rows());
+ const Index common_cols = (min)(tmp.cols(), _this.cols());
tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols);
_this.derived().swap(tmp);
}
diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h
index e804cf6bb..17fcfeeb9 100644
--- a/Eigen/src/Core/TriangularMatrix.h
+++ b/Eigen/src/Core/TriangularMatrix.h
@@ -646,7 +646,7 @@ bool MatrixBase<Derived>::isUpperTriangular(const RealScalar& prec) const
EIGEN_USING_STD_MATH(min)
for(Index j = 0; j < cols(); ++j)
{
- Index maxi = min(j, rows()-1);
+ Index maxi = (min)(j, rows()-1);
for(Index i = 0; i <= maxi; ++i)
{
RealScalar absValue = abs(coeff(i,j));
@@ -680,7 +680,7 @@ bool MatrixBase<Derived>::isLowerTriangular(const RealScalar& prec) const
RealScalar threshold = maxAbsOnLowerPart * prec;
for(Index j = 1; j < cols(); ++j)
{
- Index maxi = min(j, rows()-1);
+ Index maxi = (min)(j, rows()-1);
for(Index i = 0; i < maxi; ++i)
if(abs(coeff(i, j)) > threshold) return false;
}
@@ -896,7 +896,7 @@ struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
EIGEN_USING_STD_MATH(min)
for(Index j = 0; j < kernel.cols(); ++j)
{
- Index maxi = min(j, kernel.rows());
+ Index maxi = (min)(j, kernel.rows());
Index i = 0;
if (((Mode&Lower) && SetOpposite) || (Mode&Upper))
{