diff options
author | 2013-04-09 09:43:00 +0200 | |
---|---|---|
committer | 2013-04-09 09:43:00 +0200 | |
commit | d8f103535522dcc98c4e328e27ffea1e8450e526 (patch) | |
tree | 2fece34cf7d71077ba9621e7bedb20eccfcee7f8 /Eigen/src/Core/Functors.h | |
parent | bff264283db84282236ac2a10a2195c5b5999150 (diff) |
Fix a couple of int versus Index issues.
Diffstat (limited to 'Eigen/src/Core/Functors.h')
-rw-r--r-- | Eigen/src/Core/Functors.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/Functors.h b/Eigen/src/Core/Functors.h index 0ab767f30..9a84e8f26 100644 --- a/Eigen/src/Core/Functors.h +++ b/Eigen/src/Core/Functors.h @@ -560,7 +560,7 @@ struct linspaced_op_impl<Scalar,false> EIGEN_STRONG_INLINE const Scalar operator() (Index i) const { m_base = padd(m_base, pset1<Packet>(m_step)); - return m_low+i*m_step; + return m_low+Scalar(i)*m_step; } template<typename Index> @@ -609,7 +609,7 @@ template <typename Scalar, bool RandomAccess> struct functor_traits< linspaced_o template <typename Scalar, bool RandomAccess> struct linspaced_op { typedef typename packet_traits<Scalar>::type Packet; - linspaced_op(const Scalar& low, const Scalar& high, int num_steps) : impl((num_steps==1 ? high : low), (num_steps==1 ? Scalar() : (high-low)/(num_steps-1))) {} + linspaced_op(const Scalar& low, const Scalar& high, DenseIndex num_steps) : impl((num_steps==1 ? high : low), (num_steps==1 ? Scalar() : (high-low)/(num_steps-1))) {} template<typename Index> EIGEN_STRONG_INLINE const Scalar operator() (Index i) const { return impl(i); } |