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

Unified Diff: ui/gfx/paint_vector_icon.cc

Issue 1464603003: Use std::tie() for operator< in ui/ (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 | « ui/gfx/geometry/point_f.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/paint_vector_icon.cc
diff --git a/ui/gfx/paint_vector_icon.cc b/ui/gfx/paint_vector_icon.cc
index 91b00c9c507f95aefe283fa507a9d7707e29be13..17c57a48a87599e981abdb88c8d8bac9086df221 100644
--- a/ui/gfx/paint_vector_icon.cc
+++ b/ui/gfx/paint_vector_icon.cc
@@ -5,6 +5,7 @@
#include "ui/gfx/paint_vector_icon.h"
#include <map>
+#include <tuple>
#include "base/lazy_instance.h"
#include "base/strings/string_number_conversions.h"
@@ -346,13 +347,8 @@ class VectorIconCache {
: id(id), dip_size(dip_size), color(color), badge_id(badge_id) {}
bool operator<(const IconDescription& other) const {
- if (id != other.id)
- return id < other.id;
- if (dip_size != other.dip_size)
- return dip_size < other.dip_size;
- if (color != other.color)
- return color < other.color;
- return badge_id < other.badge_id;
+ return std::tie(id, dip_size, color, badge_id) <
+ std::tie(other.id, other.dip_size, other.color, other.badge_id);
}
VectorIconId id;
« no previous file with comments | « ui/gfx/geometry/point_f.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698