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

Unified Diff: content/browser/host_zoom_map_impl.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 | « no previous file | content/browser/loader/global_routing_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/host_zoom_map_impl.h
diff --git a/content/browser/host_zoom_map_impl.h b/content/browser/host_zoom_map_impl.h
index a9b2a45d3ef5e3fc0ffc9a38f2341530f82ba7b9..dbf166ac9a0ac21fc1873a0e60453187020ee1e4 100644
--- a/content/browser/host_zoom_map_impl.h
+++ b/content/browser/host_zoom_map_impl.h
@@ -7,6 +7,7 @@
#include <map>
#include <string>
+#include <tuple>
#include <vector>
#include "base/compiler_specific.h"
@@ -112,9 +113,8 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
: render_process_id(render_process_id),
render_view_id(render_view_id) {}
bool operator<(const RenderViewKey& other) const {
- return render_process_id < other.render_process_id ||
- ((render_process_id == other.render_process_id) &&
- (render_view_id < other.render_view_id));
+ return std::tie(render_process_id, render_view_id) <
+ std::tie(other.render_process_id, other.render_view_id);
}
};
« no previous file with comments | « no previous file | content/browser/loader/global_routing_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698