mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00: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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue