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

Unified Diff: content/public/browser/desktop_media_id.h

Issue 1462213002: Use std::tie() for operator< in content/ (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 | « content/browser/media/webrtc_identity_store_backend.cc ('k') | content/public/browser/global_request_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/desktop_media_id.h
diff --git a/content/public/browser/desktop_media_id.h b/content/public/browser/desktop_media_id.h
index c31875b310cce402aeeb8c91c17c6f696b988b30..921dc952387dab40ed5ea88d05efa491f26067d9 100644
--- a/content/public/browser/desktop_media_id.h
+++ b/content/public/browser/desktop_media_id.h
@@ -6,6 +6,7 @@
#define CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_
#include <string>
+#include <tuple>
#include "base/basictypes.h"
#include "content/common/content_export.h"
@@ -54,12 +55,10 @@ struct CONTENT_EXPORT DesktopMediaID {
// Operators so that DesktopMediaID can be used with STL containers.
bool operator<(const DesktopMediaID& other) const {
#if defined(USE_AURA)
- return (type < other.type ||
- (type == other.type &&
- (id < other.id || (id == other.id &&
- aura_id < other.aura_id))));
+ return std::tie(type, id, aura_id) <
+ std::tie(other.type, other.id, other.aura_id);
#else
- return type < other.type || (type == other.type && id < other.id);
+ return std::tie(type, id) < std::tie(other.type, other.id);
#endif
}
bool operator==(const DesktopMediaID& other) const {
« no previous file with comments | « content/browser/media/webrtc_identity_store_backend.cc ('k') | content/public/browser/global_request_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698