From 4f28ccdd0e8456391dd503928d895d3ba68c5c22 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sat, 6 Jul 2013 22:05:49 +0200 Subject: Rationalize the use of Index type in iterators --- Eigen/src/SparseCore/SparseTranspose.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Eigen/src/SparseCore/SparseTranspose.h') diff --git a/Eigen/src/SparseCore/SparseTranspose.h b/Eigen/src/SparseCore/SparseTranspose.h index c78c20a2f..7c300ee8d 100644 --- a/Eigen/src/SparseCore/SparseTranspose.h +++ b/Eigen/src/SparseCore/SparseTranspose.h @@ -34,26 +34,28 @@ template class TransposeImpl::InnerItera : public _MatrixTypeNested::InnerIterator { typedef typename _MatrixTypeNested::InnerIterator Base; + typedef typename TransposeImpl::Index Index; public: EIGEN_STRONG_INLINE InnerIterator(const TransposeImpl& trans, typename TransposeImpl::Index outer) : Base(trans.derived().nestedExpression(), outer) {} - inline typename TransposeImpl::Index row() const { return Base::col(); } - inline typename TransposeImpl::Index col() const { return Base::row(); } + Index row() const { return Base::col(); } + Index col() const { return Base::row(); } }; template class TransposeImpl::ReverseInnerIterator : public _MatrixTypeNested::ReverseInnerIterator { typedef typename _MatrixTypeNested::ReverseInnerIterator Base; + typedef typename TransposeImpl::Index Index; public: EIGEN_STRONG_INLINE ReverseInnerIterator(const TransposeImpl& xpr, typename TransposeImpl::Index outer) : Base(xpr.derived().nestedExpression(), outer) {} - inline typename TransposeImpl::Index row() const { return Base::col(); } - inline typename TransposeImpl::Index col() const { return Base::row(); } + Index row() const { return Base::col(); } + Index col() const { return Base::row(); } }; } // end namespace Eigen -- cgit v1.2.3