1- // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
21//
32// Vector.h: Rcpp R/C++ interface class library -- vectors
43//
5- // Copyright (C) 2010 - 2018 Dirk Eddelbuettel and Romain Francois
4+ // Copyright (C) 2010 - 2020 Dirk Eddelbuettel and Romain Francois
65//
76// This file is part of Rcpp.
87//
@@ -301,12 +300,12 @@ class Vector :
301300 * one dimensional offset doing bounds checking to ensure
302301 * it is valid
303302 */
304- R_xlen_t offset (const R_xlen_t& i) const {
303+ R_xlen_t offset (const R_xlen_t& i) const { // #nocov start
305304 if (i < 0 || i >= ::Rf_xlength (Storage::get__ ()) ) {
306305 const char * fmt = " Index out of bounds: [index=%i; extent=%i]." ;
307306 throw index_out_of_bounds (fmt, i, ::Rf_xlength (Storage::get__ ()) ) ;
308307 }
309- return i ;
308+ return i ; // #nocov end
310309 }
311310
312311 R_xlen_t offset (const std::string& name) const {
@@ -352,9 +351,9 @@ class Vector :
352351 inline Proxy at ( const size_t & i) {
353352 return cache.ref ( offset (i) ) ;
354353 }
355- inline const_Proxy at ( const size_t & i) const {
354+ inline const_Proxy at ( const size_t & i) const { // #nocov start
356355 return cache.ref ( offset (i) ) ;
357- }
356+ } // #nocov end
358357
359358 inline Proxy operator ()( const size_t & i, const size_t & j) {
360359 return cache.ref ( offset (i,j) ) ;
@@ -632,7 +631,7 @@ class Vector :
632631 iterator this_end (end ());
633632 if ( Rf_isNull (names) ){
634633 for ( ; it < this_end; ++it, ++target_it ){
635- *target_it = *it ;
634+ *target_it = *it ; // #nocov start
636635 }
637636 } else {
638637 Shield<SEXP> newnames ( ::Rf_allocVector ( STRSXP, n + 1 ) ) ;
@@ -642,7 +641,7 @@ class Vector :
642641 SET_STRING_ELT ( newnames, i, STRING_ELT (names, i ) ) ;
643642 }
644643 SET_STRING_ELT ( newnames, i, Rf_mkChar (" " ) ) ;
645- target.attr (" names" ) = newnames ;
644+ target.attr (" names" ) = newnames ; // #nocov end
646645 }
647646 *target_it = object_sexp;
648647 Storage::set__ ( target.get__ () ) ;
@@ -685,8 +684,8 @@ class Vector :
685684 int i=0 ;
686685 if ( Rf_isNull (names) ){
687686 for ( ; it < this_end; ++it, ++target_it,i++ ){
688- *target_it = *it ;
689- SET_STRING_ELT ( newnames, i , R_BlankString );
687+ *target_it = *it ; // #nocov
688+ SET_STRING_ELT ( newnames, i , R_BlankString ); // #nocov
690689 }
691690 } else {
692691 for ( ; it < this_end; ++it, ++target_it, i++ ){
0 commit comments