| 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) {
|
|
|