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

Unified Diff: content/browser/loader/global_routing_id.h

Issue 1462213002: Use std::tie() for operator< in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « content/browser/host_zoom_map_impl.h ('k') | content/browser/media/webrtc_identity_store_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/global_routing_id.h
diff --git a/content/browser/loader/global_routing_id.h b/content/browser/loader/global_routing_id.h
index a15e93d78da26269d99f527f8e89dcd13f226293..df5f202c22e568612508915e54f9fa4d753d83a9 100644
--- a/content/browser/loader/global_routing_id.h
+++ b/content/browser/loader/global_routing_id.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_
#define CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_
+#include <tuple>
+
namespace content {
// Uniquely identifies the route from which a net::URLRequest comes.
@@ -24,9 +26,8 @@ struct GlobalRoutingID {
int route_id;
bool operator<(const GlobalRoutingID& other) const {
- if (child_id == other.child_id)
- return route_id < other.route_id;
- return child_id < other.child_id;
+ return std::tie(child_id, route_id) <
+ std::tie(other.child_id, other.route_id);
}
bool operator==(const GlobalRoutingID& other) const {
return child_id == other.child_id &&
« no previous file with comments | « content/browser/host_zoom_map_impl.h ('k') | content/browser/media/webrtc_identity_store_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698