diff --git a/src/interfaces/r/swig_typemaps.i b/src/interfaces/r/swig_typemaps.i index baaf72fd6f4..bbd512884f4 100644 --- a/src/interfaces/r/swig_typemaps.i +++ b/src/interfaces/r/swig_typemaps.i @@ -67,11 +67,11 @@ TYPEMAP_IN_SGVECTOR(REALSXP, REAL, float64_t, "Double Precision") %typemap(out) shogun::SGVector { sg_type* vec = $1.vector; - int32_t len = $1.vlen; + auto len = $1.vlen; Rf_protect( $result = Rf_allocVector(r_type, len) ); - for (int32_t i=0; i { sg_type* matrix = $1.matrix; - int32_t num_feat = $1.num_rows; - int32_t num_vec = $1.num_cols; + auto num_feat = $1.num_rows; + auto num_vec = $1.num_cols; Rf_protect( $result = Rf_allocMatrix(r_type, num_feat, num_vec) ); - for (int32_t i=0; i { - int32_t max_len=0; - int32_t num_strings=0; + auto max_len=0; + auto num_strings=0; shogun::SGString* strs=NULL; if ($input == R_NilValue || TYPEOF($input) != STRSXP) @@ -173,11 +173,11 @@ TYPEMAP_OUT_SGMATRIX(INTSXP, INTEGER, uint16_t, int, "Word") ASSERT(num_strings>=1); strs=SG_MALLOC(shogun::SGString, num_strings); - for (int32_t i=0; i0) {