File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ 2018-11-11 Dirk Eddelbuettel <
[email protected] >
2+
3+ * inst/include/Rcpp/vector/Subsetter.h (check_indices): More
4+ informative error message as suggested by KK
5+
162018-11-09 William Nolan <
[email protected] >
27
38 * inst/include/Rcpp/vector/Subsetter.h: Fixed to use R_xlen_t instead
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class SubsetProxy {
6767 stop (" index error" );
6868 }
6969 return *this ;
70- }
70+ }
7171
7272 // Enable e.g. x[y] = 1;
7373 // TODO: std::enable_if<primitive> with C++11
@@ -139,7 +139,7 @@ class SubsetProxy {
139139 for (IDX i=0 ; i < n; ++i) {
140140 if (x[i] < 0 or x[i] >= size) {
141141 if (std::numeric_limits<IDX>::is_integer && size > std::numeric_limits<IDX>::max ()) {
142- stop (" use NumericVector to index an object of this size " );
142+ stop (" use NumericVector to index an object of length %td " , size );
143143 }
144144 stop (" index error" );
145145 }
@@ -157,7 +157,7 @@ class SubsetProxy {
157157 for (R_xlen_t i=0 ; i < rhs_n; ++i) {
158158 indices.push_back ( rhs[i] );
159159 }
160- indices_n = rhs_n;
160+ indices_n = rhs_n;
161161 }
162162
163163 void get_indices ( traits::identity< traits::int2type<REALSXP> > t ) {
You can’t perform that action at this time.
0 commit comments