diff --git a/inst/include/Rcpp/vector/MatrixRow.h b/inst/include/Rcpp/vector/MatrixRow.h index aa611806e..5c1a28b5e 100644 --- a/inst/include/Rcpp/vector/MatrixRow.h +++ b/inst/include/Rcpp/vector/MatrixRow.h @@ -206,8 +206,8 @@ class MatrixRow : public VectorBase< RTYPE, true, MatrixRow > { int parent_nrow ; int row ; - inline int get_parent_index(int i) const { - RCPP_DEBUG_4( "MatrixRow<%d>::get_parent_index(int = %d), parent_nrow = %d >> %d\n", RTYPE, i, parent_nrow, i*parent_nrow ) + inline R_xlen_t get_parent_index(int i) const { + RCPP_DEBUG_4( "MatrixRow<%d>::get_parent_index(int = %d), parent_nrow = %d >> %d\n", RTYPE, i, parent_nrow, static_cast(i) * parent_nrow ) return static_cast(i) * parent_nrow ; } } ; @@ -332,7 +332,7 @@ class ConstMatrixRow : public VectorBase< RTYPE, true, ConstMatrixRow > { int row ; inline R_xlen_t get_parent_index(int i) const { - RCPP_DEBUG_4( "ConstMatrixRow<%d>::get_parent_index(int = %d), parent_nrow = %d >> %d\n", RTYPE, i, parent_nrow, static_cast(i) *parent_nrow ) + RCPP_DEBUG_4( "ConstMatrixRow<%d>::get_parent_index(int = %d), parent_nrow = %d >> %d\n", RTYPE, i, parent_nrow, static_cast(i) * parent_nrow ) return static_cast(i) * parent_nrow ; } } ;