Skip to content

Commit 21eff5c

Browse files
authored
Clean up read-only r_vector declaration / implementation split (#371)
Should make it much easier to understand the classes just by looking at the class definition now, with all implementations separated out below
1 parent df18ba2 commit 21eff5c

File tree

2 files changed

+239
-221
lines changed

2 files changed

+239
-221
lines changed

inst/include/cpp11/list_of.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ class list_of : public list {
1313
list_of(const list& data) : list(data) {}
1414

1515
#ifdef LONG_VECTOR_SUPPORT
16-
T operator[](int pos) const { return operator[](static_cast<R_xlen_t>(pos)); }
16+
T operator[](const int pos) const { return operator[](static_cast<R_xlen_t>(pos)); }
1717
#endif
1818

19-
T operator[](R_xlen_t pos) const { return list::operator[](pos); }
19+
T operator[](const R_xlen_t pos) const { return list::operator[](pos); }
2020

2121
T operator[](const char* pos) const { return list::operator[](pos); }
2222

0 commit comments

Comments
 (0)