Make retrieve operation a const.

This commit is contained in:
Deukhoofd 2020-05-31 17:06:04 +02:00
parent 262156fbd2
commit 8ecf765ead
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ namespace ArbUt {
}
}
inline BorrowedPtr<ValueT> At(size_t index) {
inline BorrowedPtr<ValueT> At(size_t index) const {
#ifndef NO_ASSERT
if (index >= _vector.size() || index < 0) {
std::stringstream ss;
@ -56,7 +56,7 @@ namespace ArbUt {
}
inline void Append(ValueT* value) { _vector.push_back(value); }
inline BorrowedPtr<ValueT> operator[](size_t index) { return At(index); }
inline BorrowedPtr<ValueT> operator[] (size_t index) const { return At(index); }
inline size_t Count() const { return _vector.size(); }