diff options
Diffstat (limited to 'thirdparty/icu4c/common/ucnv_cb.cpp')
-rw-r--r-- | thirdparty/icu4c/common/ucnv_cb.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/thirdparty/icu4c/common/ucnv_cb.cpp b/thirdparty/icu4c/common/ucnv_cb.cpp index 7bfde82870..dd559270dd 100644 --- a/thirdparty/icu4c/common/ucnv_cb.cpp +++ b/thirdparty/icu4c/common/ucnv_cb.cpp @@ -54,8 +54,8 @@ ucnv_cbFromUWriteBytes (UConverterFromUnicodeArgs *args, U_CAPI void U_EXPORT2 ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args, - const UChar** source, - const UChar* sourceLimit, + const char16_t** source, + const char16_t* sourceLimit, int32_t offsetIndex, UErrorCode * err) { @@ -85,7 +85,7 @@ ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args, args->targetLimit, source, sourceLimit, - NULL, /* no offsets */ + nullptr, /* no offsets */ false, /* no flush */ err); @@ -140,7 +140,7 @@ ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args, newTargetLimit, source, sourceLimit, - NULL, + nullptr, false, &err2); @@ -200,12 +200,12 @@ ucnv_cbFromUWriteSub (UConverterFromUnicodeArgs *args, * and will not recurse. * At worst we should get a U_BUFFER_OVERFLOW_ERROR. */ - const UChar *source = (const UChar *)converter->subChars; + const char16_t *source = (const char16_t *)converter->subChars; ucnv_cbFromUWriteUChars(args, &source, source - length, offsetIndex, err); return; } - if(converter->sharedData->impl->writeSub!=NULL) { + if(converter->sharedData->impl->writeSub!=nullptr) { converter->sharedData->impl->writeSub(args, offsetIndex, err); } else if(converter->subChar1!=0 && (uint16_t)converter->invalidUCharBuffer[0]<=(uint16_t)0xffu) { @@ -226,7 +226,7 @@ ucnv_cbFromUWriteSub (UConverterFromUnicodeArgs *args, U_CAPI void U_EXPORT2 ucnv_cbToUWriteUChars (UConverterToUnicodeArgs *args, - const UChar* source, + const char16_t* source, int32_t length, int32_t offsetIndex, UErrorCode * err) @@ -248,7 +248,7 @@ ucnv_cbToUWriteSub (UConverterToUnicodeArgs *args, int32_t offsetIndex, UErrorCode * err) { - static const UChar kSubstituteChar1 = 0x1A, kSubstituteChar = 0xFFFD; + static const char16_t kSubstituteChar1 = 0x1A, kSubstituteChar = 0xFFFD; /* could optimize this case, just one uchar */ if(args->converter->invalidCharLength == 1 && args->converter->subChar1 != 0) { |