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); |