Update ICU to 60.1 + local patches
What's new in ICU 60.1:
- Unicode 10.0 (including Emoji 5.0)
- CLDR 32 (locale data; http://cldr.unicode.org/index/downloads/cldr-32 )
- Smaller rule file size for BreakIterator (no more reverse rules)
- A new number formatting API
- Malformed UTF-8 sequences are handled per W3C Encoding Standard
- See http://site.icu-project.org/download/60 for more details.
In addition, the following changes are made:
* Add more locale variants for en,fr,de,it,pt,nl,ru,ar
* Add the minimum locale data for Osage and Chakma
* Apply locale data patches (Google and Chromium)
* Apply build-related and break iterator patches:
wpo.patch
vscomp.patch
data.build.win.patch
data_symb.patch
cjdict.patch
khmer-dictbe.patch
wordbrk.patch
patches/data.build.patch
* Update BUILD.gn and gyp files.
* Data file size (25 ~ 130kB smaller than the latest 59.1)
android/icudtl.dat 6499904
common/icudtl.dat 10170896
ios/icudtl.dat 6486240
The update steps are recorded in
https://chromium.googlesource.com/chromium/deps/icu/+log/f88520f..1034c7e5 .
Bug: 766816
Test: None (DEPS roll CL will have test specified).
Change-Id: I9144bb37464eec1f282f40f9f2d28b6306511083
Reviewed-on: https://chromium-review.googlesource.com/756237
Reviewed-by: Mark Mentovai <mark@chromium.org>
diff --git a/source/common/brkiter.cpp b/source/common/brkiter.cpp
index f8e4d98..ab02f1c 100644
--- a/source/common/brkiter.cpp
+++ b/source/common/brkiter.cpp
@@ -195,7 +195,7 @@
// ------------------------------------------
//
-// Default constructor and destructor
+// Constructors, destructor and assignment operator
//
//-------------------------------------------
@@ -204,6 +204,19 @@
*validLocale = *actualLocale = 0;
}
+BreakIterator::BreakIterator(const BreakIterator &other) : UObject(other) {
+ uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale));
+ uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale));
+}
+
+BreakIterator &BreakIterator::operator =(const BreakIterator &other) {
+ if (this != &other) {
+ uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale));
+ uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale));
+ }
+ return *this;
+}
+
BreakIterator::~BreakIterator()
{
}
@@ -265,7 +278,7 @@
// defined in ucln_cmn.h
U_NAMESPACE_END
-static icu::UInitOnce gInitOnce;
+static icu::UInitOnce gInitOnceBrkiter;
static icu::ICULocaleService* gService = NULL;
@@ -280,7 +293,7 @@
delete gService;
gService = NULL;
}
- gInitOnce.reset();
+ gInitOnceBrkiter.reset();
#endif
return TRUE;
}
@@ -296,7 +309,7 @@
static ICULocaleService*
getService(void)
{
- umtx_initOnce(gInitOnce, &initService);
+ umtx_initOnce(gInitOnceBrkiter, &initService);
return gService;
}
@@ -306,7 +319,7 @@
static inline UBool
hasService(void)
{
- return !gInitOnce.isReset() && getService() != NULL;
+ return !gInitOnceBrkiter.isReset() && getService() != NULL;
}
// -------------------------------------