AK: Implement ReverseIterator for NonnullPtrVector
This commit is contained in:
parent
b0e74a3fd3
commit
a54e20d958
Notes:
sideshowbarker
2024-07-17 18:13:59 +09:00
Author: https://github.com/guerinoni Commit: https://github.com/SerenityOS/serenity/commit/a54e20d958 Pull-request: https://github.com/SerenityOS/serenity/pull/12741 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/linusg
1 changed files with 3 additions and 0 deletions
|
@ -31,12 +31,15 @@ public:
|
|||
|
||||
using ConstIterator = SimpleIterator<const NonnullPtrVector, const T>;
|
||||
using Iterator = SimpleIterator<NonnullPtrVector, T>;
|
||||
using ReverseIterator = SimpleReverseIterator<NonnullPtrVector, T>;
|
||||
|
||||
ALWAYS_INLINE constexpr ConstIterator begin() const { return ConstIterator::begin(*this); }
|
||||
ALWAYS_INLINE constexpr Iterator begin() { return Iterator::begin(*this); }
|
||||
ALWAYS_INLINE constexpr ReverseIterator rbegin() { return ReverseIterator::rbegin(*this); }
|
||||
|
||||
ALWAYS_INLINE constexpr ConstIterator end() const { return ConstIterator::end(*this); }
|
||||
ALWAYS_INLINE constexpr Iterator end() { return Iterator::end(*this); }
|
||||
ALWAYS_INLINE constexpr ReverseIterator rend() { return ReverseIterator::rend(*this); }
|
||||
|
||||
ALWAYS_INLINE PtrType& ptr_at(size_t index) { return Base::at(index); }
|
||||
ALWAYS_INLINE const PtrType& ptr_at(size_t index) const { return Base::at(index); }
|
||||
|
|
Loading…
Add table
Reference in a new issue