X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..2ca993e82fb37b597a3c73ecd1586a139a6579c5:/icuSources/common/unistr_cnv.cpp diff --git a/icuSources/common/unistr_cnv.cpp b/icuSources/common/unistr_cnv.cpp index 1626b884..38998ffd 100644 --- a/icuSources/common/unistr_cnv.cpp +++ b/icuSources/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) {