Switch from 'index' to 'ptr'
diff --git a/include/cxx.h b/include/cxx.h
index d19e318..de0e315 100644
--- a/include/cxx.h
+++ b/include/cxx.h
@@ -540,8 +540,8 @@
template <typename T>
T &Slice<T>::operator[](std::size_t n) const noexcept {
assert(n < this->size());
- auto index = static_cast<char *>(slicePtr(this)) + size_of<T>() * n;
- return *reinterpret_cast<T *>(index);
+ auto ptr = static_cast<char *>(slicePtr(this)) + size_of<T>() * n;
+ return *reinterpret_cast<T *>(ptr);
}
template <typename T>
@@ -579,8 +579,8 @@
template <typename T>
typename Slice<T>::iterator::reference Slice<T>::iterator::operator[](
typename Slice<T>::iterator::difference_type n) const noexcept {
- auto index = static_cast<char *>(this->pos) + this->stride * n;
- return *reinterpret_cast<T *>(index);
+ auto ptr = static_cast<char *>(this->pos) + this->stride * n;
+ return *reinterpret_cast<T *>(ptr);
}
template <typename T>