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

Unified Diff: content/public/browser/global_request_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/public/browser/desktop_media_id.h ('k') | content/renderer/pepper/host_var_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/global_request_id.h
diff --git a/content/public/browser/global_request_id.h b/content/public/browser/global_request_id.h
index 8714b2f61f4bf9bfd41eaabc22d3d551c1c1ec0d..5f3f5995f1f4a4f595de433ba6c8063dd5e8963f 100644
--- a/content/public/browser/global_request_id.h
+++ b/content/public/browser/global_request_id.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_PUBLIC_BROWSER_GLOBAL_REQUEST_ID_H_
#define CONTENT_PUBLIC_BROWSER_GLOBAL_REQUEST_ID_H_
+#include <tuple>
+
namespace content {
// Uniquely identifies a net::URLRequest.
@@ -24,9 +26,8 @@ struct GlobalRequestID {
int request_id;
bool operator<(const GlobalRequestID& other) const {
- if (child_id == other.child_id)
- return request_id < other.request_id;
- return child_id < other.child_id;
+ return std::tie(child_id, request_id) <
+ std::tie(other.child_id, other.request_id);
}
bool operator==(const GlobalRequestID& other) const {
return child_id == other.child_id &&
« no previous file with comments | « content/public/browser/desktop_media_id.h ('k') | content/renderer/pepper/host_var_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698