Skip to content

Commit c8c3a5c

Browse files
committed
don't check index when constructing iterators
1 parent 394e220 commit c8c3a5c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

inst/include/Rcpp/vector/traits.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ namespace traits{
7979
void update( const VECTOR& v ){
8080
p = const_cast<VECTOR*>(&v) ;
8181
}
82-
inline iterator get() const { check_index(0); return iterator( proxy(*p, 0 ) ) ;}
83-
inline const_iterator get_const() const { check_index(0); return const_iterator( const_proxy(*p, 0) ) ; }
82+
inline iterator get() const { return iterator( proxy(*p, 0 ) ) ;}
83+
inline const_iterator get_const() const { return const_iterator( const_proxy(*p, 0) ) ; }
8484

8585
inline proxy ref() { check_index(0); return proxy(*p,0) ; }
8686
inline proxy ref(R_xlen_t i) { check_index(i); return proxy(*p,i);}

tests/tinytest.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ if (requireNamespace("tinytest", quietly=TRUE)) {
4343
## there are several more granular ways to test files in a tinytest directory,
4444
## see its package vignette; tests can also run once the package is installed
4545
## using the same command `test_package(pkgName)`, or by director or file
46-
tinytest::test_package("Rcpp", ncpu=getOption("Ncpus", 1))
46+
tinytest::test_package("Rcpp", ncpu=getOption("Ncpus"))
4747
}

0 commit comments

Comments
 (0)