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

Unified Diff: base/memory/mru_cache.h

Issue 7187005: Avoiding duplication of singular iterator (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/mru_cache.h
diff --git a/base/memory/mru_cache.h b/base/memory/mru_cache.h
index 132b324bc7e3bc2d1f37d87e4fb098ac6432d4e0..32a6fbbbdbe990223dff6cd85780b2f78949fe4d 100644
--- a/base/memory/mru_cache.h
+++ b/base/memory/mru_cache.h
@@ -91,7 +91,7 @@ class MRUCacheBase {
}
ordering_.push_front(value_type(key, payload));
- index_[key] = ordering_.begin();
+ index_.insert(std::make_pair(key, ordering_.begin()));
tzik 2011/06/16 08:55:19 Previous 10 lines guarantee the absence of occupan
return ordering_.begin();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698