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

Unified Diff: base/id_map.h

Issue 609001: Merge 39084 - Correctly recognize emptiness of IDMap.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 10 years, 10 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 | base/id_map_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/id_map.h
===================================================================
--- base/id_map.h (revision 39086)
+++ base/id_map.h (working copy)
@@ -65,7 +65,7 @@
}
bool IsEmpty() const {
- return data_.empty();
+ return size() == 0u;
}
T* Lookup(int32 id) const {
@@ -76,7 +76,7 @@
}
size_t size() const {
- return data_.size();
+ return data_.size() - removed_ids_.size();
}
// It is safe to remove elements from the map during iteration. All iterators
« no previous file with comments | « no previous file | base/id_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698