[Rcpp-devel] [Rcpp-commits] r321 - pkg/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jan 8 19:59:01 CET 2010
Author: romain
Date: 2010-01-08 19:59:00 +0100 (Fri, 08 Jan 2010)
New Revision: 321
Modified:
pkg/src/wrap.cpp
Log:
more uses of size_t instead of int
Modified: pkg/src/wrap.cpp
===================================================================
--- pkg/src/wrap.cpp 2010-01-08 18:55:38 UTC (rev 320)
+++ pkg/src/wrap.cpp 2010-01-08 18:59:00 UTC (rev 321)
@@ -113,7 +113,7 @@
LogicalVector wrap(const std::vector<bool> & v){
logTxt("RObject from bool vector\n");
- int n = v.size();
+ size_t n = v.size();
SEXP m_sexp = PROTECT( Rf_allocVector(LGLSXP, n) );
copy( v.begin(), v.end(), LOGICAL(m_sexp) ) ;
LogicalVector o(m_sexp) ;
@@ -123,7 +123,7 @@
IntegerVector wrap(const std::vector<int> & v){
logTxt("RObject from int vector\n");
- int n = v.size();
+ size_t n = v.size();
SEXP m_sexp = PROTECT( Rf_allocVector(INTSXP, n) );
copy( v.begin(), v.end(), INTEGER(m_sexp) ) ;
IntegerVector o(m_sexp) ;
@@ -133,7 +133,7 @@
NumericVector wrap(const std::vector<double> & v){
logTxt("RObject from double vector\n");
- int n = v.size();
+ size_t n = v.size();
SEXP m_sexp = PROTECT( Rf_allocVector(REALSXP, n) );
copy( v.begin(), v.end(), REAL(m_sexp) ) ;
NumericVector o(m_sexp) ;
@@ -143,7 +143,7 @@
RawVector wrap(const std::vector<Rbyte> & v){
logTxt("RObject from vector<Rbyte> \n");
- int n = v.size();
+ size_t n = v.size();
SEXP m_sexp = PROTECT(Rf_allocVector(RAWSXP, n));
copy( v.begin(), v.end(), RAW(m_sexp) ) ;
RawVector o(m_sexp) ;
@@ -155,7 +155,7 @@
IntegerVector wrap(const std::set<int> & v){
logTxt("RObject from set<int>\n");
- int n = v.size();
+ size_t n = v.size();
SEXP m_sexp = PROTECT( Rf_allocVector(INTSXP, n) );
copy( v.begin(), v.end(), INTEGER(m_sexp) ) ;
IntegerVector o(m_sexp) ;
@@ -165,7 +165,7 @@
NumericVector wrap(const std::set<double> & v){
logTxt("RObject from set<double>\n");
- int n = v.size();
+ size_t n = v.size();
SEXP m_sexp = PROTECT( Rf_allocVector(REALSXP, n) );
copy( v.begin(), v.end(), REAL(m_sexp) ) ;
NumericVector o(m_sexp) ;
@@ -175,7 +175,7 @@
RawVector wrap(const std::set<Rbyte> & v){
logTxt("RObject from set<Rbyte> \n");
- int n = v.size();
+ size_t n = v.size();
SEXP m_sexp = PROTECT( Rf_allocVector(RAWSXP, n) );
copy( v.begin(), v.end(), RAW(m_sexp) ) ;
RawVector o(m_sexp) ;
@@ -185,7 +185,7 @@
CharacterVector wrap(const std::set<std::string> & v){
logTxt("RObject from set<string>\n");
- int n = v.size();
+ size_t n = v.size();
SEXP m_sexp = PROTECT( Rf_allocVector(STRSXP, n) );
int i=0;
std::set<std::string>::iterator it = v.begin();
_______________________________________________
Rcpp-commits mailing list
Rcpp-commits at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-commits
More information about the Rcpp-devel
mailing list