Index: cc/base/list_container.h |
diff --git a/cc/base/list_container.h b/cc/base/list_container.h |
index 305298f9d2989c5500a82c0a36603e9258b6e250..8ee4b58e853a61738b379f79c4da39c2a6c96600 100644 |
--- a/cc/base/list_container.h |
+++ b/cc/base/list_container.h |
@@ -144,7 +144,7 @@ class CC_EXPORT ListContainerBase { |
// Unlike the ListContainer methods, these do not invoke element destructors. |
void RemoveLast(); |
- void EraseAndInvalidateAllPointers(Iterator position); |
+ void EraseAndInvalidateAllPointers(Iterator* position); |
void InsertBeforeAndInvalidateAllPointers(Iterator* position, |
size_t number_of_elements); |
@@ -227,10 +227,11 @@ class ListContainer : public ListContainerBase { |
// When called, all raw pointers that have been handed out are no longer |
// valid. Use with caution. |
// This function does not deallocate memory. |
ccameron
2015/09/02 21:41:55
I'd pass position by pointer here (to match Insert
Andre
2015/09/02 21:54:51
Hmm, but ListContainer::InsertBefore below returns
Andre
2015/09/02 22:08:52
Also, making it take a pointer would make code lik
ccameron
2015/09/02 22:22:33
Yes, you're right, that was a bad suggestion.
May
Andre
2015/09/03 22:45:59
Done. This was split off into another CL.
|
- void EraseAndInvalidateAllPointers(Iterator position) { |
+ Iterator EraseAndInvalidateAllPointers(Iterator position) { |
BaseElementType* item = *position; |
item->~BaseElementType(); |
- ListContainerBase::EraseAndInvalidateAllPointers(position); |
+ ListContainerBase::EraseAndInvalidateAllPointers(&position); |
+ return position; |
} |
ConstReverseIterator crbegin() const { |