Index: base/i18n/string_compare.cc |
diff --git a/base/i18n/string_compare.cc b/base/i18n/string_compare.cc |
index 2851e7d2dce1e4a724af636ec448a2ac1d8eacd2..afd136ce9a48be62ae79c8209a446fc987bbe17e 100644 |
--- a/base/i18n/string_compare.cc |
+++ b/base/i18n/string_compare.cc |
@@ -16,10 +16,11 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator, |
const string16& lhs, |
const string16& rhs) { |
UErrorCode error = U_ZERO_ERROR; |
- UCollationResult result = collator.compare( |
- static_cast<const UChar*>(lhs.c_str()), static_cast<int>(lhs.length()), |
- static_cast<const UChar*>(rhs.c_str()), static_cast<int>(rhs.length()), |
- error); |
+ UCollationResult result = |
+ collator.compare(reinterpret_cast<const char16_t*>(lhs.c_str()), |
+ static_cast<int>(lhs.length()), |
+ reinterpret_cast<const char16_t*>(rhs.c_str()), |
+ static_cast<int>(rhs.length()), error); |
DCHECK(U_SUCCESS(error)); |
return result; |
} |