1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[ADT][NFC] Use size_t type for index in indexed_accessor_range

It makes it consistent with `size()` method return type and with
STL-like containers API.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D97921
This commit is contained in:
Vladislav Vinogradov 2021-03-04 11:28:24 +03:00
parent ae45d1cec4
commit 7536c97c89

View File

@ -1114,9 +1114,9 @@ public:
iterator begin() const { return iterator(base, 0); }
iterator end() const { return iterator(base, count); }
ReferenceT operator[](unsigned index) const {
assert(index < size() && "invalid index for value range");
return DerivedT::dereference_iterator(base, index);
ReferenceT operator[](size_t Index) const {
assert(Index < size() && "invalid index for value range");
return DerivedT::dereference_iterator(base, static_cast<ptrdiff_t>(Index));
}
ReferenceT front() const {
assert(!empty() && "expected non-empty range");