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

Unified Diff: base/i18n/string_compare.cc

Issue 2740673002: Prepare Chromium and Blink for ICU 59 (Closed)
Patch Set: revert accidental revert of sftnly roll during rebase 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
« no previous file with comments | « base/i18n/number_formatting.cc ('k') | base/i18n/time_formatting.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/string_compare.cc
diff --git a/base/i18n/string_compare.cc b/base/i18n/string_compare.cc
index 2851e7d2dce1e4a724af636ec448a2ac1d8eacd2..649c28119fe3a588380c516a5f115d814e93115c 100644
--- a/base/i18n/string_compare.cc
+++ b/base/i18n/string_compare.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
+#include "third_party/icu/source/common/unicode/unistr.h"
namespace base {
namespace i18n {
@@ -17,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator,
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()),
+ icu::UnicodeString(FALSE, lhs.c_str(), static_cast<int>(lhs.length())),
+ icu::UnicodeString(FALSE, rhs.c_str(), static_cast<int>(rhs.length())),
error);
DCHECK(U_SUCCESS(error));
return result;
« no previous file with comments | « base/i18n/number_formatting.cc ('k') | base/i18n/time_formatting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698