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

Unified Diff: components/mus/ws/ids.h

Issue 1459973005: Reland of Use std::tie() for operator< in components/ (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
Index: components/mus/ws/ids.h
diff --git a/components/mus/ws/ids.h b/components/mus/ws/ids.h
index 3c814d0bde691b7505f3442e0928219d88cbdbc7..8ae41c9ce352d3a08c6e9b232f9c4ca793790829 100644
--- a/components/mus/ws/ids.h
+++ b/components/mus/ws/ids.h
@@ -4,6 +4,8 @@
#ifndef COMPONENTS_MUS_WS_IDS_H_
#define COMPONENTS_MUS_WS_IDS_H_
+
+#include <tuple>
#include "components/mus/common/types.h"
#include "components/mus/common/util.h"
@@ -29,10 +31,8 @@
bool operator!=(const WindowId& other) const { return !(*this == other); }
bool operator<(const WindowId& other) const {
- if (connection_id == other.connection_id)
- return window_id < other.window_id;
-
- return connection_id < other.connection_id;
+ return std::tie(connection_id, window_id) <
+ std::tie(other.connection_id, other.window_id);
}
ConnectionSpecificId connection_id;
« no previous file with comments | « components/guest_view/browser/guest_view_manager.cc ('k') | components/policy/core/common/policy_namespace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698