@@ -34,10 +34,10 @@ class Vectorized : public VectorBase<REALSXP, NA, Vectorized<Func,NA,VEC> >{
3434 typedef typename Rcpp::traits::Extractor<REALSXP,NA,VEC>::type VEC_EXT ;
3535
3636 Vectorized ( const VEC_TYPE& object_) : object( object_.get_ref() ){}
37- inline double operator []( int i) const {
37+ inline double operator []( R_xlen_t i) const {
3838 return Func ( object[i] ) ;
3939 }
40- inline int size () const { return object.size (); }
40+ inline R_xlen_t size () const { return object.size (); }
4141
4242private:
4343 const VEC_EXT& object ;
@@ -50,12 +50,12 @@ class Vectorized_INTSXP : public VectorBase<REALSXP, NA, Vectorized_INTSXP<Func,
5050 typedef typename Rcpp::traits::Extractor<INTSXP,NA,VEC>::type VEC_EXT ;
5151
5252 Vectorized_INTSXP ( const VEC_TYPE& object_) : object( object_.get_ref() ){}
53- inline double operator []( int i) const {
53+ inline double operator []( R_xlen_t i) const {
5454 int x = object[i] ;
5555 if ( x == NA_INTEGER ) return NA_REAL ;
5656 return Func ( x ) ;
5757 }
58- inline int size () const { return object.size (); }
58+ inline R_xlen_t size () const { return object.size (); }
5959
6060private:
6161 const VEC_EXT& object ;
@@ -68,10 +68,10 @@ class Vectorized_INTSXP<Func,false,VEC> :
6868 typedef typename Rcpp::traits::Extractor<INTSXP,false ,VEC>::type VEC_EXT ;
6969
7070 Vectorized_INTSXP ( const VEC_TYPE& object_) : object( object_.get_ref() ){}
71- inline double operator []( int i) const {
71+ inline double operator []( R_xlen_t i) const {
7272 return Func ( object[i] ) ;
7373 }
74- inline int size () const { return object.size (); }
74+ inline R_xlen_t size () const { return object.size (); }
7575
7676private:
7777 const VEC_EXT& object ;
0 commit comments