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

Unified Diff: source/common/unistr_cnv.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 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 | « source/common/unistr_case.cpp ('k') | source/common/unistrappender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/unistr_cnv.cpp
diff --git a/source/common/unistr_cnv.cpp b/source/common/unistr_cnv.cpp
index 1626b8843f28ea67b283fa0fd6899a6e9c8f5c54..38998ffd026c4da0fbd19cb8d3ab21540854b08a 100644
--- a/source/common/unistr_cnv.cpp
+++ b/source/common/unistr_cnv.cpp
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 1999-2010, International Business Machines
+* Copyright (C) 1999-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -39,20 +39,16 @@ U_NAMESPACE_BEGIN
#if !U_CHARSET_IS_UTF8
-UnicodeString::UnicodeString(const char *codepageData)
- : fShortLength(0),
- fFlags(kShortString)
-{
+UnicodeString::UnicodeString(const char *codepageData) {
+ fUnion.fFields.fLengthAndFlags = kShortString;
if(codepageData != 0) {
doCodepageCreate(codepageData, (int32_t)uprv_strlen(codepageData), 0);
}
}
UnicodeString::UnicodeString(const char *codepageData,
- int32_t dataLength)
- : fShortLength(0),
- fFlags(kShortString)
-{
+ int32_t dataLength) {
+ fUnion.fFields.fLengthAndFlags = kShortString;
if(codepageData != 0) {
doCodepageCreate(codepageData, dataLength, 0);
}
@@ -62,10 +58,8 @@ UnicodeString::UnicodeString(const char *codepageData,
#endif
UnicodeString::UnicodeString(const char *codepageData,
- const char *codepage)
- : fShortLength(0),
- fFlags(kShortString)
-{
+ const char *codepage) {
+ fUnion.fFields.fLengthAndFlags = kShortString;
if(codepageData != 0) {
doCodepageCreate(codepageData, (int32_t)uprv_strlen(codepageData), codepage);
}
@@ -73,10 +67,8 @@ UnicodeString::UnicodeString(const char *codepageData,
UnicodeString::UnicodeString(const char *codepageData,
int32_t dataLength,
- const char *codepage)
- : fShortLength(0),
- fFlags(kShortString)
-{
+ const char *codepage) {
+ fUnion.fFields.fLengthAndFlags = kShortString;
if(codepageData != 0) {
doCodepageCreate(codepageData, dataLength, codepage);
}
@@ -84,10 +76,8 @@ UnicodeString::UnicodeString(const char *codepageData,
UnicodeString::UnicodeString(const char *src, int32_t srcLength,
UConverter *cnv,
- UErrorCode &errorCode)
- : fShortLength(0),
- fFlags(kShortString)
-{
+ UErrorCode &errorCode) {
+ fUnion.fFields.fLengthAndFlags = kShortString;
if(U_SUCCESS(errorCode)) {
// check arguments
if(src==NULL) {
« no previous file with comments | « source/common/unistr_case.cpp ('k') | source/common/unistrappender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698