summaryrefslogtreecommitdiff
path: root/AK/NonnullPtrVector.h
diff options
context:
space:
mode:
authorFederico Guerinoni <guerinoni.federico@gmail.com>2022-03-05 14:05:56 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-09 17:16:28 +0100
commit0aed2f0f868e2b5ec00b0ad77e037b77d40b9967 (patch)
treed7286ae4267b8016bf4dc13c9a0478295012c201 /AK/NonnullPtrVector.h
parentf34fff852bff6ff6ab703f0b9b9327f345a811e3 (diff)
downloadserenity-0aed2f0f868e2b5ec00b0ad77e037b77d40b9967.zip
AK: Add reverse iterator as member
Diffstat (limited to 'AK/NonnullPtrVector.h')
-rw-r--r--AK/NonnullPtrVector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/AK/NonnullPtrVector.h b/AK/NonnullPtrVector.h
index 728d37314d..c628196c1a 100644
--- a/AK/NonnullPtrVector.h
+++ b/AK/NonnullPtrVector.h
@@ -41,6 +41,11 @@ public:
ALWAYS_INLINE constexpr Iterator end() { return Iterator::end(*this); }
ALWAYS_INLINE constexpr ReverseIterator rend() { return ReverseIterator::rend(*this); }
+ ALWAYS_INLINE constexpr auto in_reverse()
+ {
+ return ReverseWrapper::in_reverse(*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); }