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

Unified Diff: components/guest_view/browser/guest_view_manager.cc

Issue 1447153002: 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/guest_view/browser/guest_view_manager.cc
diff --git a/components/guest_view/browser/guest_view_manager.cc b/components/guest_view/browser/guest_view_manager.cc
index 4c86e9d17439fad976ee75dc623b66492bfc72bc..c93f95307f3a629dbbcd407038a43c0a205626e8 100644
--- a/components/guest_view/browser/guest_view_manager.cc
+++ b/components/guest_view/browser/guest_view_manager.cc
@@ -4,6 +4,8 @@
#include "components/guest_view/browser/guest_view_manager.h"
+#include <tuple>
+
#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "components/guest_view/browser/guest_view_base.h"
@@ -476,10 +478,8 @@ GuestViewManager::ElementInstanceKey::ElementInstanceKey(
bool GuestViewManager::ElementInstanceKey::operator<(
const GuestViewManager::ElementInstanceKey& other) const {
- if (embedder_process_id != other.embedder_process_id)
- return embedder_process_id < other.embedder_process_id;
-
- return element_instance_id < other.element_instance_id;
+ return std::tie(embedder_process_id, element_instance_id) <
+ std::tie(other.embedder_process_id, other.element_instance_id);
}
bool GuestViewManager::ElementInstanceKey::operator==(

Powered by Google App Engine
This is Rietveld 408576698