Skip to content

Commit 6691c5f

Browse files
krlmlreddelbuettel
authored andcommitted
explicit cast from size_t to int (#715)
1 parent 1ec267a commit 6691c5f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

inst/include/Rcpp/Dimension.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ namespace Rcpp{
4040
return *this ;
4141
}
4242
Dimension(const size_t& n1) : dims(1){
43-
dims[0] = n1 ;
43+
dims[0] = static_cast<int>(n1) ;
4444
}
4545
Dimension(const size_t& n1, const size_t& n2) : dims(2){
46-
dims[0] = n1 ;
47-
dims[1] = n2 ;
46+
dims[0] = static_cast<int>(n1) ;
47+
dims[1] = static_cast<int>(n2) ;
4848
}
4949
Dimension(const size_t& n1, const size_t& n2, const size_t& n3) : dims(3){
50-
dims[0] = n1 ;
51-
dims[1] = n2 ;
52-
dims[2] = n3 ;
50+
dims[0] = static_cast<int>(n1) ;
51+
dims[1] = static_cast<int>(n2) ;
52+
dims[2] = static_cast<int>(n3) ;
5353
}
5454
operator SEXP() const ;
5555

0 commit comments

Comments
 (0)