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

Unified Diff: components/omnibox/browser/url_index_private_data.cc

Issue 2333253002: flat containers prototype (Closed)
Patch Set: Fixing performance bug in insert(It, It) Created 4 years, 1 month 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 | « components/omnibox/browser/url_index_private_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/url_index_private_data.cc
diff --git a/components/omnibox/browser/url_index_private_data.cc b/components/omnibox/browser/url_index_private_data.cc
index a702948211f91be9e6200e557d338118999c1ef8..e50cce039dcde3e615910f81e3bb460c3f3a609d 100644
--- a/components/omnibox/browser/url_index_private_data.cc
+++ b/components/omnibox/browser/url_index_private_data.cc
@@ -253,7 +253,7 @@ ScoredHistoryMatches URLIndexPrivateData::HistoryItemsForTerms(
for (SearchTermCacheMap::iterator cache_iter = search_term_cache_.begin();
cache_iter != search_term_cache_.end(); ) {
if (!cache_iter->second.used_)
- search_term_cache_.erase(cache_iter++);
+ cache_iter = search_term_cache_.erase(cache_iter);
Peter Kasting 2016/11/29 19:17:45 FWIW, now that C++11 provides this on std::map, we
dyaroshev 2016/11/29 20:09:14 Some time ago there was a problem with the standar
Peter Kasting 2016/11/29 20:29:06 I don't either.
else
++cache_iter;
}
@@ -605,7 +605,7 @@ HistoryIDSet URLIndexPrivateData::HistoryIDsForTerm(
for (WordIDSet::iterator word_set_iter = word_id_set.begin();
word_set_iter != word_id_set.end(); ) {
if (word_list_[*word_set_iter].find(term) == base::string16::npos)
- word_id_set.erase(word_set_iter++);
+ word_set_iter = word_id_set.erase(word_set_iter);
else
++word_set_iter;
}
« no previous file with comments | « components/omnibox/browser/url_index_private_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698