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

Unified Diff: base/i18n/string_compare.cc

Issue 2740673002: Prepare Chromium and Blink for ICU 59 (Closed)
Patch Set: fix one more file in Blink; blink_tests can be built without any error on Linux Created 3 years, 9 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698