am 40cd4515
: am 78b4977e
: Merge "Ensure that Vector::erase() returns a valid iterator" into jb-mr1-aah-dev
* commit '40cd45151513ecc02c95e0cc1b40480dd816cdd4': Ensure that Vector::erase() returns a valid iterator
This commit is contained in:
commit
7e4eb72ad8
@ -188,7 +188,8 @@ public:
|
|||||||
inline void push_back(const TYPE& item) { insertAt(item, size(), 1); }
|
inline void push_back(const TYPE& item) { insertAt(item, size(), 1); }
|
||||||
inline void push_front(const TYPE& item) { insertAt(item, 0, 1); }
|
inline void push_front(const TYPE& item) { insertAt(item, 0, 1); }
|
||||||
inline iterator erase(iterator pos) {
|
inline iterator erase(iterator pos) {
|
||||||
return begin() + removeItemsAt(pos-array());
|
ssize_t index = removeItemsAt(pos-array());
|
||||||
|
return begin() + index;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user