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

Unified Diff: extensions/browser/event_router.cc

Issue 1461163002: Use std::tie() for operator< in extensions/ (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 | « extensions/browser/api/declarative/rules_registry_service.h ('k') | extensions/browser/process_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/event_router.cc
diff --git a/extensions/browser/event_router.cc b/extensions/browser/event_router.cc
index 0aeec38c377215c427099724562bd906ecc3dc53..649856d1ef65351beb62f64ff1208a718b5a4253 100644
--- a/extensions/browser/event_router.cc
+++ b/extensions/browser/event_router.cc
@@ -4,6 +4,7 @@
#include "extensions/browser/event_router.h"
+#include <tuple>
#include <utility>
#include "base/atomic_sequence_num.h"
@@ -95,11 +96,8 @@ struct EventRouter::ListenerProcess {
: process(process), extension_id(extension_id) {}
bool operator<(const ListenerProcess& that) const {
- if (process < that.process)
- return true;
- if (process == that.process && extension_id < that.extension_id)
- return true;
- return false;
+ return std::tie(process, extension_id) <
+ std::tie(that.process, that.extension_id);
}
};
« no previous file with comments | « extensions/browser/api/declarative/rules_registry_service.h ('k') | extensions/browser/process_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698