Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Unified Diff: cc/base/list_container.h

Issue 1304053016: Mac Overlays: Allow multiple overlays with sandwich strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snapshot
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/base/list_container.cc » ('j') | cc/output/overlay_strategy_common.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « no previous file | cc/base/list_container.cc » ('j') | cc/output/overlay_strategy_common.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698