diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-05-17 18:14:19 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-05-17 18:39:31 +0300 |
commit | 93fba7ead33b45a6f9904ab6a69ada72e8564230 (patch) | |
tree | 2d29c9b6ebaec415bdce2100e2319fcb651d8bbe /thirdparty/icu4c/common/ubrk.cpp | |
parent | 7ea8cde9834b0fda4a928217b7880da3dd330214 (diff) |
Update HarfBuzz, ICU and FreeType.
HarfBuzz: Update to version 4.2.1
FreeType: Update to version 2.12.1
ICU: Update to version 71.1
Diffstat (limited to 'thirdparty/icu4c/common/ubrk.cpp')
-rw-r--r-- | thirdparty/icu4c/common/ubrk.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/thirdparty/icu4c/common/ubrk.cpp b/thirdparty/icu4c/common/ubrk.cpp index bb5bdd1b50..f4e064961f 100644 --- a/thirdparty/icu4c/common/ubrk.cpp +++ b/thirdparty/icu4c/common/ubrk.cpp @@ -168,7 +168,7 @@ ubrk_safeClone( BreakIterator *newBI = ((BreakIterator *)bi)->clone(); if (newBI == NULL) { *status = U_MEMORY_ALLOCATION_ERROR; - } else { + } else if (pBufferSize != NULL) { *status = U_SAFECLONE_ALLOCATED_WARNING; } return (UBreakIterator *)newBI; @@ -176,15 +176,7 @@ ubrk_safeClone( U_CAPI UBreakIterator * U_EXPORT2 ubrk_clone(const UBreakIterator *bi, UErrorCode *status) { - if (U_FAILURE(*status)) { - return nullptr; - } - BreakIterator *newBI = ((BreakIterator *)bi)->clone(); - if (newBI == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; - return nullptr; - } - return (UBreakIterator *)newBI; + return ubrk_safeClone(bi, nullptr, nullptr, status); } |