summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorJason Simmons <jsimmons@google.com>2012-10-25 18:06:06 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-25 18:06:06 -0700
commit40cd45151513ecc02c95e0cc1b40480dd816cdd4 (patch)
tree2edd6d2d5d1216c6b4e0a048b4ff7cc733788e08 /include/utils
parentc0384266699aadd23a11bcdfd8a92f6dae8bf36c (diff)
parent78b4977efd365d2ad7c9227c3a89e65ab60c3260 (diff)
downloadframeworks_native-40cd45151513ecc02c95e0cc1b40480dd816cdd4.zip
frameworks_native-40cd45151513ecc02c95e0cc1b40480dd816cdd4.tar.gz
frameworks_native-40cd45151513ecc02c95e0cc1b40480dd816cdd4.tar.bz2
am 78b4977e: Merge "Ensure that Vector::erase() returns a valid iterator" into jb-mr1-aah-dev
* commit '78b4977efd365d2ad7c9227c3a89e65ab60c3260': Ensure that Vector::erase() returns a valid iterator
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/Vector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/utils/Vector.h b/include/utils/Vector.h
index 7927328..f3020d6 100644
--- a/include/utils/Vector.h
+++ b/include/utils/Vector.h
@@ -188,7 +188,8 @@ public:
inline void push_back(const TYPE& item) { insertAt(item, size(), 1); }
inline void push_front(const TYPE& item) { insertAt(item, 0, 1); }
inline iterator erase(iterator pos) {
- return begin() + removeItemsAt(pos-array());
+ ssize_t index = removeItemsAt(pos-array());
+ return begin() + index;
}
protected: