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
+
1
6
2018-11-09 William Nolan <
[email protected] >
2
7
3
8
* 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 {
67
67
stop (" index error" );
68
68
}
69
69
return *this ;
70
- }
70
+ }
71
71
72
72
// Enable e.g. x[y] = 1;
73
73
// TODO: std::enable_if<primitive> with C++11
@@ -139,7 +139,7 @@ class SubsetProxy {
139
139
for (IDX i=0 ; i < n; ++i) {
140
140
if (x[i] < 0 or x[i] >= size) {
141
141
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 );
143
143
}
144
144
stop (" index error" );
145
145
}
@@ -157,7 +157,7 @@ class SubsetProxy {
157
157
for (R_xlen_t i=0 ; i < rhs_n; ++i) {
158
158
indices.push_back ( rhs[i] );
159
159
}
160
- indices_n = rhs_n;
160
+ indices_n = rhs_n;
161
161
}
162
162
163
163
void get_indices ( traits::identity< traits::int2type<REALSXP> > t ) {
You can’t perform that action at this time.
0 commit comments