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

Unified Diff: extensions/browser/api/declarative/rules_registry_service.h

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 | « no previous file | extensions/browser/event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/declarative/rules_registry_service.h
diff --git a/extensions/browser/api/declarative/rules_registry_service.h b/extensions/browser/api/declarative/rules_registry_service.h
index c00ce5749c4d2f37213dc0fa5950736d802229ea..60b720b97ad2056ac97b647beadb6b53f72804e3 100644
--- a/extensions/browser/api/declarative/rules_registry_service.h
+++ b/extensions/browser/api/declarative/rules_registry_service.h
@@ -7,6 +7,7 @@
#include <map>
#include <string>
+#include <tuple>
#include <vector>
#include "base/callback_forward.h"
@@ -43,9 +44,8 @@ class RulesRegistryService : public BrowserContextKeyedAPI,
RulesRegistryKey(const std::string& event_name, int rules_registry_id)
: event_name(event_name), rules_registry_id(rules_registry_id) {}
bool operator<(const RulesRegistryKey& other) const {
- return (event_name < other.event_name) ||
- ((event_name == other.event_name) &&
- (rules_registry_id < other.rules_registry_id));
+ return std::tie(event_name, rules_registry_id) <
+ std::tie(other.event_name, other.rules_registry_id);
}
};
« no previous file with comments | « no previous file | extensions/browser/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698