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

Unified Diff: extensions/renderer/user_script_injector.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/common/permissions/usb_device_permission_data.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/user_script_injector.cc
diff --git a/extensions/renderer/user_script_injector.cc b/extensions/renderer/user_script_injector.cc
index 548b4d634cd5d5fdf8a053e010da674b8ef22e8c..9885b4ea8d38c8d798dd55f301ad24fa16dedf72 100644
--- a/extensions/renderer/user_script_injector.cc
+++ b/extensions/renderer/user_script_injector.cc
@@ -4,6 +4,7 @@
#include "extensions/renderer/user_script_injector.h"
+#include <tuple>
#include <vector>
#include "base/lazy_instance.h"
@@ -36,12 +37,8 @@ struct RoutingInfoKey {
: routing_id(routing_id), script_id(script_id) {}
bool operator<(const RoutingInfoKey& other) const {
- if (routing_id != other.routing_id)
- return routing_id < other.routing_id;
-
- if (script_id != other.script_id)
- return script_id < other.script_id;
- return false; // keys are equal.
+ return std::tie(routing_id, script_id) <
+ std::tie(other.routing_id, other.script_id);
}
};
« no previous file with comments | « extensions/common/permissions/usb_device_permission_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698