Fix integer conversion warning

This commit is contained in:
Christoph Hertzberg 2018-08-30 17:12:53 +02:00
parent 6111dce0e8
commit 03326d9155

View File

@ -192,7 +192,7 @@ template <std::size_t V1=0, std::size_t V2=0, std::size_t V3=0, std::size_t V4=0
}
#endif
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex operator[] (const int index) const {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index operator[] (const Index index) const {
switch (index) {
case 0:
return internal::get<0, Base>::value;
@ -206,7 +206,7 @@ template <std::size_t V1=0, std::size_t V2=0, std::size_t V3=0, std::size_t V4=0
return internal::get<4, Base>::value;
default:
eigen_assert(false && "index overflow");
return static_cast<DenseIndex>(-1);
return static_cast<Index>(-1);
}
}