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

Unified Diff: ui/views/layout/grid_layout.cc

Issue 2126433002: Use container::back() and container::pop_back() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pre-increment Created 4 years, 5 months 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/views/controls/textfield/textfield_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/layout/grid_layout.cc
diff --git a/ui/views/layout/grid_layout.cc b/ui/views/layout/grid_layout.cc
index c79b600ffef0e0c3dceab36b94e17625820c06e7..438d376415b8d249e9bbd7a89b19bd4fadbb958e 100644
--- a/ui/views/layout/grid_layout.cc
+++ b/ui/views/layout/grid_layout.cc
@@ -937,8 +937,8 @@ void GridLayout::SizeRowsAndColumns(bool layout, int width, int height,
LayoutElement::CalculateLocationsFromSize(&rows_);
// We now know the preferred height, set it here.
- pref->set_height(rows_[rows_.size() - 1]->Location() +
- rows_[rows_.size() - 1]->Size() + insets_.height());
+ pref->set_height(rows_.back()->Location() + rows_.back()->Size() +
+ insets_.height());
if (layout && height != pref->height()) {
// We're doing a layout, and the height differs from the preferred height,
« no previous file with comments | « ui/views/controls/textfield/textfield_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698