diff options
author | Antonio Sanchez <cantonios@google.com> | 2021-03-29 09:25:39 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2021-03-29 17:40:55 +0000 |
commit | af1247fbc160868d124f7f1047a62026eb785d68 (patch) | |
tree | ad67b0f8e04d0795beae78d77ec55df7f6540432 /Eigen | |
parent | 87729ea39ff22e0f949ca64ec372f381d9e39708 (diff) |
Use Index type in loop over coefficients.
Previously was `int`. Brought up by Kyle Snow (Polaris Geospatial
Services) on the mailing list.
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index 1447f2977..202ed7100 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -13,10 +13,10 @@ #if defined(EIGEN_INITIALIZE_MATRICES_BY_ZERO) # define EIGEN_INITIALIZE_COEFFS -# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED for(int i=0;i<base().size();++i) coeffRef(i)=Scalar(0); +# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED for(Index i=0;i<base().size();++i) coeffRef(i)=Scalar(0); #elif defined(EIGEN_INITIALIZE_MATRICES_BY_NAN) # define EIGEN_INITIALIZE_COEFFS -# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED for(int i=0;i<base().size();++i) coeffRef(i)=std::numeric_limits<Scalar>::quiet_NaN(); +# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED for(Index i=0;i<base().size();++i) coeffRef(i)=std::numeric_limits<Scalar>::quiet_NaN(); #else # undef EIGEN_INITIALIZE_COEFFS # define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED @@ -540,7 +540,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type m_storage.data()[1] = a1; m_storage.data()[2] = a2; m_storage.data()[3] = a3; - int i = 4; + Index i = 4; auto x = {(m_storage.data()[i++] = args, 0)...}; static_cast<void>(x); } |