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

Unified Diff: content/renderer/pepper/host_var_tracker.cc

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/global_request_id.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/host_var_tracker.cc
diff --git a/content/renderer/pepper/host_var_tracker.cc b/content/renderer/pepper/host_var_tracker.cc
index e3da98312cfd09e94481460082f55552e07816c1..1b78ddc7c4e4ff34bbc6beeaf9ecec0a05e2fe85 100644
--- a/content/renderer/pepper/host_var_tracker.cc
+++ b/content/renderer/pepper/host_var_tracker.cc
@@ -4,6 +4,8 @@
#include "content/renderer/pepper/host_var_tracker.h"
+#include <tuple>
+
#include "base/logging.h"
#include "content/renderer/pepper/host_array_buffer_var.h"
#include "content/renderer/pepper/host_globals.h"
@@ -32,9 +34,7 @@ HostVarTracker::V8ObjectVarKey::~V8ObjectVarKey() {}
bool HostVarTracker::V8ObjectVarKey::operator<(
const V8ObjectVarKey& other) const {
- if (instance == other.instance)
- return hash < other.hash;
- return instance < other.instance;
+ return std::tie(instance, hash) < std::tie(other.instance, other.hash);
}
HostVarTracker::HostVarTracker()
« no previous file with comments | « content/public/browser/global_request_id.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698