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

Unified Diff: ui/base/models/list_model.h

Issue 10669038: base: Remove dereference structure operator (i.e ->) from ScopedVector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 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 | « sync/test/engine/mock_connection_manager.cc ('k') | ui/base/models/tree_node_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/models/list_model.h
diff --git a/ui/base/models/list_model.h b/ui/base/models/list_model.h
index 754d6eb08546a86210696b20bc243b69ad8f8a9a..16d0d81e94e1d56836e0ee6cb8ba101057b2d248 100644
--- a/ui/base/models/list_model.h
+++ b/ui/base/models/list_model.h
@@ -26,7 +26,7 @@ class ListModel {
// Adds |item| to the model at given |index|.
void AddAt(size_t index, ItemType* item) {
DCHECK_LE(index, item_count());
- items_->insert(items_.begin() + index, item);
+ items_.insert(items_.begin() + index, item);
NotifyItemsAdded(index, 1);
}
@@ -40,7 +40,7 @@ class ListModel {
ItemType* RemoveAt(size_t index) {
DCHECK_LT(index, item_count());
ItemType* item = items_[index];
- items_->erase(items_.begin() + index);
+ items_.weak_erase(items_.begin() + index);
NotifyItemsRemoved(index, 1);
return item;
}
@@ -48,7 +48,7 @@ class ListModel {
// Removes all items from the model. This does NOT delete the items.
void RemoveAll() {
size_t count = item_count();
- items_->clear();
+ items_.clear();
NotifyItemsRemoved(0, count);
}
« no previous file with comments | « sync/test/engine/mock_connection_manager.cc ('k') | ui/base/models/tree_node_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698