diff --git a/src/zone/zone.h b/src/zone/zone.h index 455b2895e7..3ebcadfa3c 100644 --- a/src/zone/zone.h +++ b/src/zone/zone.h @@ -390,9 +390,11 @@ class ScopedPtrList final { typedef T** iterator; inline iterator begin() const { - return reinterpret_cast(&buffer_[start_]); + return reinterpret_cast(buffer_.data() + start_); + } + inline iterator end() const { + return reinterpret_cast(buffer_.data() + end_); } - inline iterator end() const { return reinterpret_cast(&buffer_[end_]); } private: std::vector& buffer_;