@@ -11,16 +11,16 @@ SEXP transpose(SEXP l, SEXP fill, SEXP ignoreArg, SEXP keepNamesArg, SEXP listCo
1111 return (copyAsPlain (l ));
1212 if (!isLogical (ignoreArg ) || LOGICAL (ignoreArg )[0 ] == NA_LOGICAL )
1313 error (_ ("ignore.empty should be logical TRUE/FALSE." ));
14- bool ignore = LOGICAL_RO (ignoreArg )[0 ];
14+ const bool ignore = LOGICAL_RO (ignoreArg )[0 ];
1515 if (!(isNull (keepNamesArg ) || (isString (keepNamesArg ) && LENGTH (keepNamesArg ) == 1 )))
1616 error (_ ("keep.names should be either NULL, or the name of the first column of the result in which to place the names of the input" ));
17- bool rn = !isNull (keepNamesArg );
17+ const bool rn = !isNull (keepNamesArg );
1818 if (length (fill ) != 1 )
1919 error (_ ("fill must be a length 1 vector, such as the default NA" ));
20- R_len_t ln = LENGTH (l );
20+ const R_len_t ln = LENGTH (l );
2121 if (!IS_TRUE_OR_FALSE (listColsArg ))
2222 error (_ ("list.cols should be logical TRUE/FALSE." ));
23- bool listCol = LOGICAL_RO (listColsArg )[0 ];
23+ const bool listCol = LOGICAL_RO (listColsArg )[0 ];
2424
2525 // preprocessing
2626 int maxlen = 0 , zerolen = 0 ;
@@ -39,7 +39,7 @@ SEXP transpose(SEXP l, SEXP fill, SEXP ignoreArg, SEXP keepNamesArg, SEXP listCo
3939 if (listCol ) maxtype = VECSXP ; // need to keep preprocessing for zerolen
4040 fill = PROTECT (coerceVector (fill , maxtype )); nprotect ++ ;
4141 SEXP ans = PROTECT (allocVector (VECSXP , maxlen + rn )); nprotect ++ ;
42- int anslen = (ignore ) ? (ln - zerolen ) : ln ;
42+ const int anslen = (ignore ) ? (ln - zerolen ) : ln ;
4343 if (rn ) {
4444 SEXP tt ;
4545 SET_VECTOR_ELT (ans , 0 , tt = allocVector (STRSXP , anslen ));
0 commit comments