Skip to content

Commit 0fea37f

Browse files
author
thirdwing
committed
Vector(unsigned int)
1 parent 3de7c34 commit 0fea37f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

inst/include/Rcpp/vector/Vector.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ class Vector :
128128
Storage::set__( Rf_allocVector( RTYPE, static_cast<R_xlen_t>(size)) ) ;
129129
init() ;
130130
}
131+
Vector( const unsigned int& size ) {
132+
Storage::set__( Rf_allocVector( RTYPE, static_cast<R_xlen_t>(size)) ) ;
133+
init() ;
134+
}
131135

132136
Vector( const double& size ) {
133137
Storage::set__( Rf_allocVector( RTYPE, static_cast<R_xlen_t>(size)) ) ;
@@ -138,7 +142,7 @@ class Vector :
138142
Storage::set__( Rf_allocVector( RTYPE, size) ) ;
139143
init() ;
140144
}
141-
145+
142146
Vector( const Dimension& dims) {
143147
Storage::set__( Rf_allocVector( RTYPE, dims.prod() ) ) ;
144148
init() ;

0 commit comments

Comments
 (0)