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

Unified Diff: ui/views/controls/textfield/textfield_model.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: 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/ozone/platform/drm/gpu/drm_device.cc ('k') | ui/views/layout/grid_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield_model.cc
diff --git a/ui/views/controls/textfield/textfield_model.cc b/ui/views/controls/textfield/textfield_model.cc
index 297ea1978cb84132388d102cbef5833fa8ade271..188747866fc2dc0ca4cc37480e129dd4252c3854 100644
--- a/ui/views/controls/textfield/textfield_model.cc
+++ b/ui/views/controls/textfield/textfield_model.cc
@@ -441,7 +441,7 @@ bool TextfieldModel::CanUndo() {
}
bool TextfieldModel::CanRedo() {
- if (!edit_history_.size())
+ if (edit_history_.empty())
return false;
// There is no redo iff the current edit is the last element in the history.
EditHistory::iterator iter = current_edit_;
@@ -478,7 +478,7 @@ bool TextfieldModel::Redo() {
if (current_edit_ == edit_history_.end())
current_edit_ = edit_history_.begin();
else
- current_edit_ ++;
Nico 2016/07/13 16:23:27 O_o
+ current_edit_++;
base::string16 old = text();
size_t old_cursor = GetCursorPosition();
(*current_edit_)->Redo(this);
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.cc ('k') | ui/views/layout/grid_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698