mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 21:54:40 +03:00
AK: Add VectorIterator::index()
A simple helper function that extracts the index of an iterator. Note that the index is not valid if the iterator is end().
This commit is contained in:
parent
2a89bb2ac4
commit
a846ee76ea
Notes:
sideshowbarker
2024-07-19 12:53:35 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a846ee76eaf
@ -50,6 +50,7 @@ public:
|
||||
int operator-(const VectorIterator& other) { return m_index - other.m_index; }
|
||||
|
||||
bool is_end() const { return m_index == m_vector.size(); }
|
||||
int index() const { return m_index; }
|
||||
|
||||
private:
|
||||
friend VectorType;
|
||||
|
Loading…
Reference in New Issue
Block a user