Skip to content

Commit 3de7c34

Browse files
author
Qiang Kou
committed
Vector(double)
1 parent 98bc314 commit 3de7c34

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

inst/include/Rcpp/vector/Vector.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ class Vector :
125125
}
126126

127127
Vector( const size_t& size ) {
128-
Storage::set__( Rf_allocVector( RTYPE, size) ) ;
128+
Storage::set__( Rf_allocVector( RTYPE, static_cast<R_xlen_t>(size)) ) ;
129+
init() ;
130+
}
131+
132+
Vector( const double& size ) {
133+
Storage::set__( Rf_allocVector( RTYPE, static_cast<R_xlen_t>(size)) ) ;
129134
init() ;
130135
}
131136

0 commit comments

Comments
 (0)