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

Unified Diff: views/controls/textfield/textfield_views_model.cc

Issue 7008005: base/i18n: Pass |str| as const reference in BreakIterator::Init(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const reference Created 9 years, 7 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/base/text/text_elider.cc ('k') | views/view_text_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield_views_model.cc
diff --git a/views/controls/textfield/textfield_views_model.cc b/views/controls/textfield/textfield_views_model.cc
index 50d966262edae8d4efa250858fc6eaa7436c41c1..a50fc01c0686b9595e4ced2e0e2e102f1c01963b 100644
--- a/views/controls/textfield/textfield_views_model.cc
+++ b/views/controls/textfield/textfield_views_model.cc
@@ -431,7 +431,7 @@ void TextfieldViewsModel::MoveCursorToPreviousWord(bool select) {
// This is probably fast enough for our usage, but we may
// want to modify WordIterator so that it can start from the
// middle of string and advance backwards.
- base::i18n::BreakIterator iter(&text_, base::i18n::BreakIterator::BREAK_WORD);
+ base::i18n::BreakIterator iter(text_, base::i18n::BreakIterator::BREAK_WORD);
bool success = iter.Init();
DCHECK(success);
if (!success)
@@ -463,7 +463,7 @@ void TextfieldViewsModel::MoveCursorToPreviousWord(bool select) {
void TextfieldViewsModel::MoveCursorToNextWord(bool select) {
if (HasCompositionText())
ConfirmCompositionText();
- base::i18n::BreakIterator iter(&text_, base::i18n::BreakIterator::BREAK_WORD);
+ base::i18n::BreakIterator iter(text_, base::i18n::BreakIterator::BREAK_WORD);
bool success = iter.Init();
DCHECK(success);
if (!success)
« no previous file with comments | « ui/base/text/text_elider.cc ('k') | views/view_text_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698