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

Unified Diff: views/controls/tree/tree_view.cc

Issue 5154009: Cleanup AdjustStringForLocaleDirection() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: further fixes Created 10 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
Index: views/controls/tree/tree_view.cc
diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc
index 6b02a62fbb04195d4c036980b5220ad8297cf9e5..bfdd454d6460e522172d9315f17699866e1823de 100644
--- a/views/controls/tree/tree_view.cc
+++ b/views/controls/tree/tree_view.cc
@@ -370,9 +370,7 @@ LRESULT TreeView::OnNotify(int w_param, LPNMHDR l_param) {
DCHECK(info->item.cchTextMax);
// Adjust the string direction if such adjustment is required.
- std::wstring localized_text;
- if (base::i18n::AdjustStringForLocaleDirection(text, &localized_text))
- text.swap(localized_text);
+ base::i18n::AdjustStringForLocaleDirection(&text);
wcsncpy_s(info->item.pszText, info->item.cchTextMax, text.c_str(),
_TRUNCATE);

Powered by Google App Engine
This is Rietveld 408576698