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

Unified Diff: net/base/host_cache.h

Issue 338023: Fix a bad comparator. This caused lookups in std::map to be wrong.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Remove %s from format string Created 11 years, 2 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 | net/base/host_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_cache.h
===================================================================
--- net/base/host_cache.h (revision 30053)
+++ net/base/host_cache.h (working copy)
@@ -42,9 +42,9 @@
}
bool operator<(const Key& other) const {
- if (address_family < other.address_family)
- return true;
- return hostname < other.hostname;
+ if (address_family == other.address_family)
+ return hostname < other.hostname;
+ return address_family < other.address_family;
}
std::string hostname;
« no previous file with comments | « no previous file | net/base/host_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698