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

Unified Diff: ui/app_list/views/apps_grid_view.h

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 | « no previous file | ui/gfx/geometry/point.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/apps_grid_view.h
diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h
index d96d3490c35171619d7e365089ec9f53a33b9c39..814abf42cb47131418f29ca8e70365a1d61acd20 100644
--- a/ui/app_list/views/apps_grid_view.h
+++ b/ui/app_list/views/apps_grid_view.h
@@ -7,6 +7,7 @@
#include <set>
#include <string>
+#include <tuple>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -243,10 +244,7 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
return page != other.page || slot != other.slot;
}
bool operator<(const Index& other) const {
- if (page != other.page)
- return page < other.page;
-
- return slot < other.slot;
+ return std::tie(page, slot) < std::tie(other.page, other.slot);
}
int page; // Which page an item view is on.
« no previous file with comments | « no previous file | ui/gfx/geometry/point.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698