diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-05-23 03:05:01 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-05-23 03:26:16 +0300 |
commit | b64df2bf74eddbf28e2e484d05c46a5ad0d7ee14 (patch) | |
tree | 92094a0540179f5722b1fe10499ef45155928fcb /thirdparty/icu4c/common/unicode | |
parent | d5c1b9f883adbb54900c145eafcaa789d0fd563c (diff) | |
download | redot-engine-b64df2bf74eddbf28e2e484d05c46a5ad0d7ee14.tar.gz |
Update HarfBuzz, ICU and FreeType
HarfBuzz: Update to version 7.3.0
ICU4C: Update to version 73.1
FreeType: Update to version 2.13.0
Diffstat (limited to 'thirdparty/icu4c/common/unicode')
41 files changed, 469 insertions, 427 deletions
diff --git a/thirdparty/icu4c/common/unicode/appendable.h b/thirdparty/icu4c/common/unicode/appendable.h index f77df88e39..0e37f4562a 100644 --- a/thirdparty/icu4c/common/unicode/appendable.h +++ b/thirdparty/icu4c/common/unicode/appendable.h @@ -79,7 +79,7 @@ public: /** * Appends a string. * The default implementation calls appendCodeUnit(char16_t) for each code unit. - * @param s string, must not be NULL if length!=0 + * @param s string, must not be nullptr if length!=0 * @param length string length, or -1 if NUL-terminated * @return true if the operation succeeded * @stable ICU 4.8 @@ -186,7 +186,7 @@ public: /** * Appends a string to the UnicodeString. - * @param s string, must not be NULL if length!=0 + * @param s string, must not be nullptr if length!=0 * @param length string length, or -1 if NUL-terminated * @return true if the operation succeeded * @stable ICU 4.8 diff --git a/thirdparty/icu4c/common/unicode/brkiter.h b/thirdparty/icu4c/common/unicode/brkiter.h index 3a121cf703..108652799e 100644 --- a/thirdparty/icu4c/common/unicode/brkiter.h +++ b/thirdparty/icu4c/common/unicode/brkiter.h @@ -162,7 +162,7 @@ public: * access the text without impacting any break iterator operations, * but the underlying text itself must not be altered. * - * @param fillIn A UText to be filled in. If NULL, a new UText will be + * @param fillIn A UText to be filled in. If nullptr, a new UText will be * allocated to hold the result. * @param status receives any error codes. * @return The current UText for this break iterator. If an input @@ -503,7 +503,7 @@ public: * * Thread safe client-buffer-based cloning operation * Do NOT call delete on a safeclone, since 'new' is not used to create it. - * @param stackBuffer user allocated space for the new clone. If NULL new memory will be allocated. + * @param stackBuffer user allocated space for the new clone. If nullptr new memory will be allocated. * If buffer is not large enough, new memory will be allocated. * @param BufferSize reference to size of allocated space. * If BufferSize == 0, a sufficient size for use in cloning will diff --git a/thirdparty/icu4c/common/unicode/bytestrie.h b/thirdparty/icu4c/common/unicode/bytestrie.h index 8fe66780f5..1719a6bb83 100644 --- a/thirdparty/icu4c/common/unicode/bytestrie.h +++ b/thirdparty/icu4c/common/unicode/bytestrie.h @@ -69,7 +69,7 @@ public: * @stable ICU 4.8 */ BytesTrie(const void *trieBytes) - : ownedArray_(NULL), bytes_(static_cast<const uint8_t *>(trieBytes)), + : ownedArray_(nullptr), bytes_(static_cast<const uint8_t *>(trieBytes)), pos_(bytes_), remainingMatchLength_(-1) {} /** @@ -85,7 +85,7 @@ public: * @stable ICU 4.8 */ BytesTrie(const BytesTrie &other) - : ownedArray_(NULL), bytes_(other.bytes_), + : ownedArray_(nullptr), bytes_(other.bytes_), pos_(other.pos_), remainingMatchLength_(other.remainingMatchLength_) {} /** @@ -143,7 +143,7 @@ public: * Constructs an empty State. * @stable ICU 4.8 */ - State() { bytes=NULL; } + State() { bytes=nullptr; } private: friend class BytesTrie; @@ -177,7 +177,7 @@ public: * @stable ICU 4.8 */ BytesTrie &resetToState(const State &state) { - if(bytes_==state.bytes && bytes_!=NULL) { + if(bytes_==state.bytes && bytes_!=nullptr) { pos_=state.pos; remainingMatchLength_=state.remainingMatchLength; } @@ -227,7 +227,7 @@ public: * result=next(c); * return result; * \endcode - * @param s A string or byte sequence. Can be NULL if length is 0. + * @param s A string or byte sequence. Can be nullptr if length is 0. * @param length The length of the byte sequence. Can be -1 if NUL-terminated. * @return The match/value Result. * @stable ICU 4.8 @@ -262,7 +262,7 @@ public: inline UBool hasUniqueValue(int32_t &uniqueValue) const { const uint8_t *pos=pos_; // Skip the rest of a pending linear-match node. - return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue); + return pos!=nullptr && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue); } /** @@ -397,7 +397,7 @@ private: BytesTrie &operator=(const BytesTrie &other) = delete; inline void stop() { - pos_=NULL; + pos_=nullptr; } // Reads a compact 32-bit integer. @@ -555,7 +555,7 @@ private: // Iterator variables. - // Pointer to next trie byte to read. NULL if no more matches. + // Pointer to next trie byte to read. nullptr if no more matches. const uint8_t *pos_; // Remaining length of a linear-match node, minus 1. Negative if not in such a node. int32_t remainingMatchLength_; diff --git a/thirdparty/icu4c/common/unicode/caniter.h b/thirdparty/icu4c/common/unicode/caniter.h index db400a531b..035bd0e64e 100644 --- a/thirdparty/icu4c/common/unicode/caniter.h +++ b/thirdparty/icu4c/common/unicode/caniter.h @@ -73,7 +73,7 @@ Results for: {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMB * @author C++ port by V. Weinstein * @stable ICU 2.4 */ -class U_COMMON_API CanonicalIterator U_FINAL : public UObject { +class U_COMMON_API CanonicalIterator final : public UObject { public: /** * Construct a CanonicalIterator object diff --git a/thirdparty/icu4c/common/unicode/casemap.h b/thirdparty/icu4c/common/unicode/casemap.h index 53af84fa74..eca7cbf80a 100644 --- a/thirdparty/icu4c/common/unicode/casemap.h +++ b/thirdparty/icu4c/common/unicode/casemap.h @@ -30,7 +30,7 @@ class Edits; * * @stable ICU 59 */ -class U_COMMON_API CaseMap U_FINAL : public UMemory { +class U_COMMON_API CaseMap final : public UMemory { public: /** * Lowercases a UTF-16 string and optionally records edits. @@ -38,7 +38,7 @@ public: * The result may be longer or shorter than the original. * The source string and the destination buffer must not overlap. * - * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param locale The locale ID. ("" = root locale, nullptr = default locale.) * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. * @param src The original string. * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. @@ -46,13 +46,13 @@ public: * the buffer is large enough. * The contents is undefined in case of failure. * @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then - * dest may be NULL and the function will only return the length of the result + * dest may be nullptr and the function will only return the length of the result * without writing any of the result string. * @param edits Records edits for index mapping, working with styled text, * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @return The length of the result string, if successful. @@ -74,7 +74,7 @@ public: * The result may be longer or shorter than the original. * The source string and the destination buffer must not overlap. * - * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param locale The locale ID. ("" = root locale, nullptr = default locale.) * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. * @param src The original string. * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. @@ -82,13 +82,13 @@ public: * the buffer is large enough. * The contents is undefined in case of failure. * @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then - * dest may be NULL and the function will only return the length of the result + * dest may be nullptr and the function will only return the length of the result * without writing any of the result string. * @param edits Records edits for index mapping, working with styled text, * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @return The length of the result string, if successful. @@ -116,7 +116,7 @@ public: * that are to be titlecased. It titlecases those characters and lowercases * all others. (This can be modified with options bits.) * - * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param locale The locale ID. ("" = root locale, nullptr = default locale.) * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, * U_TITLECASE_NO_LOWERCASE, * U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, @@ -124,7 +124,7 @@ public: * @param iter A break iterator to find the first characters of words that are to be titlecased. * It is set to the source string (setText()) * and used one or more times for iteration (first() and next()). - * If NULL, then a word break iterator for the locale is used + * If nullptr, then a word break iterator for the locale is used * (or something equivalent). * @param src The original string. * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. @@ -132,13 +132,13 @@ public: * the buffer is large enough. * The contents is undefined in case of failure. * @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then - * dest may be NULL and the function will only return the length of the result + * dest may be nullptr and the function will only return the length of the result * without writing any of the result string. * @param edits Records edits for index mapping, working with styled text, * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @return The length of the result string, if successful. @@ -175,13 +175,13 @@ public: * the buffer is large enough. * The contents is undefined in case of failure. * @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then - * dest may be NULL and the function will only return the length of the result + * dest may be nullptr and the function will only return the length of the result * without writing any of the result string. * @param edits Records edits for index mapping, working with styled text, * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @return The length of the result string, if successful. @@ -202,7 +202,7 @@ public: * Casing is locale-dependent and context-sensitive. * The result may be longer or shorter than the original. * - * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param locale The locale ID. ("" = root locale, nullptr = default locale.) * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. * @param src The original string. * @param sink A ByteSink to which the result string is written. @@ -211,7 +211,7 @@ public: * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @@ -228,7 +228,7 @@ public: * Casing is locale-dependent and context-sensitive. * The result may be longer or shorter than the original. * - * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param locale The locale ID. ("" = root locale, nullptr = default locale.) * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. * @param src The original string. * @param sink A ByteSink to which the result string is written. @@ -237,7 +237,7 @@ public: * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @@ -260,7 +260,7 @@ public: * that are to be titlecased. It titlecases those characters and lowercases * all others. (This can be modified with options bits.) * - * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param locale The locale ID. ("" = root locale, nullptr = default locale.) * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, * U_TITLECASE_NO_LOWERCASE, * U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, @@ -268,7 +268,7 @@ public: * @param iter A break iterator to find the first characters of words that are to be titlecased. * It is set to the source string (setUText()) * and used one or more times for iteration (first() and next()). - * If NULL, then a word break iterator for the locale is used + * If nullptr, then a word break iterator for the locale is used * (or something equivalent). * @param src The original string. * @param sink A ByteSink to which the result string is written. @@ -277,7 +277,7 @@ public: * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @@ -308,7 +308,7 @@ public: * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @@ -326,7 +326,7 @@ public: * The result may be longer or shorter than the original. * The source string and the destination buffer must not overlap. * - * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param locale The locale ID. ("" = root locale, nullptr = default locale.) * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. * @param src The original string. * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. @@ -334,13 +334,13 @@ public: * the buffer is large enough. * The contents is undefined in case of failure. * @param destCapacity The size of the buffer (number of bytes). If it is 0, then - * dest may be NULL and the function will only return the length of the result + * dest may be nullptr and the function will only return the length of the result * without writing any of the result string. * @param edits Records edits for index mapping, working with styled text, * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @return The length of the result string, if successful. @@ -362,7 +362,7 @@ public: * The result may be longer or shorter than the original. * The source string and the destination buffer must not overlap. * - * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param locale The locale ID. ("" = root locale, nullptr = default locale.) * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. * @param src The original string. * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. @@ -370,13 +370,13 @@ public: * the buffer is large enough. * The contents is undefined in case of failure. * @param destCapacity The size of the buffer (number of bytes). If it is 0, then - * dest may be NULL and the function will only return the length of the result + * dest may be nullptr and the function will only return the length of the result * without writing any of the result string. * @param edits Records edits for index mapping, working with styled text, * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @return The length of the result string, if successful. @@ -404,7 +404,7 @@ public: * that are to be titlecased. It titlecases those characters and lowercases * all others. (This can be modified with options bits.) * - * @param locale The locale ID. ("" = root locale, NULL = default locale.) + * @param locale The locale ID. ("" = root locale, nullptr = default locale.) * @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, * U_TITLECASE_NO_LOWERCASE, * U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, @@ -412,7 +412,7 @@ public: * @param iter A break iterator to find the first characters of words that are to be titlecased. * It is set to the source string (setUText()) * and used one or more times for iteration (first() and next()). - * If NULL, then a word break iterator for the locale is used + * If nullptr, then a word break iterator for the locale is used * (or something equivalent). * @param src The original string. * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. @@ -420,13 +420,13 @@ public: * the buffer is large enough. * The contents is undefined in case of failure. * @param destCapacity The size of the buffer (number of bytes). If it is 0, then - * dest may be NULL and the function will only return the length of the result + * dest may be nullptr and the function will only return the length of the result * without writing any of the result string. * @param edits Records edits for index mapping, working with styled text, * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @return The length of the result string, if successful. @@ -462,13 +462,13 @@ public: * the buffer is large enough. * The contents is undefined in case of failure. * @param destCapacity The size of the buffer (number of bytes). If it is 0, then - * dest may be NULL and the function will only return the length of the result + * dest may be nullptr and the function will only return the length of the result * without writing any of the result string. * @param edits Records edits for index mapping, working with styled text, * and getting only changes (if any). * The Edits contents is undefined if any error occurs. * This function calls edits->reset() first unless - * options includes U_EDITS_NO_RESET. edits can be NULL. + * options includes U_EDITS_NO_RESET. edits can be nullptr. * @param errorCode Reference to an in/out error code value * which must not indicate a failure before the function call. * @return The length of the result string, if successful. diff --git a/thirdparty/icu4c/common/unicode/char16ptr.h b/thirdparty/icu4c/common/unicode/char16ptr.h index c8a9ae6c35..de8182c7ad 100644 --- a/thirdparty/icu4c/common/unicode/char16ptr.h +++ b/thirdparty/icu4c/common/unicode/char16ptr.h @@ -39,7 +39,7 @@ U_NAMESPACE_BEGIN * char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. * @stable ICU 59 */ -class U_COMMON_API Char16Ptr U_FINAL { +class U_COMMON_API Char16Ptr final { public: /** * Copies the pointer. @@ -146,7 +146,7 @@ char16_t *Char16Ptr::get() const { return u_.cp; } * const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. * @stable ICU 59 */ -class U_COMMON_API ConstChar16Ptr U_FINAL { +class U_COMMON_API ConstChar16Ptr final { public: /** * Copies the pointer. diff --git a/thirdparty/icu4c/common/unicode/chariter.h b/thirdparty/icu4c/common/unicode/chariter.h index 4f320b90e2..45f4d984c7 100644 --- a/thirdparty/icu4c/common/unicode/chariter.h +++ b/thirdparty/icu4c/common/unicode/chariter.h @@ -297,7 +297,7 @@ protected: * \code * void traverseForward(CharacterIterator& iter) * { - * for(char16_t c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { + * for(char16_t c = iter.first(); c != CharacterIterator::DONE; c = iter.next()) { * processChar(c); * } * } @@ -308,7 +308,7 @@ protected: * \code * void traverseBackward(CharacterIterator& iter) * { - * for(char16_t c = iter.last(); c != CharacterIterator.DONE; c = iter.previous()) { + * for(char16_t c = iter.last(); c != CharacterIterator::DONE; c = iter.previous()) { * processChar(c); * } * } @@ -322,11 +322,11 @@ protected: * { * char16_t c; * for (c = iter.setIndex(pos); - * c != CharacterIterator.DONE && (Unicode::isLetter(c) || Unicode::isDigit(c)); + * c != CharacterIterator::DONE && (Unicode::isLetter(c) || Unicode::isDigit(c)); * c = iter.next()) {} * int32_t end = iter.getIndex(); * for (c = iter.setIndex(pos); - * c != CharacterIterator.DONE && (Unicode::isLetter(c) || Unicode::isDigit(c)); + * c != CharacterIterator::DONE && (Unicode::isLetter(c) || Unicode::isDigit(c)); * c = iter.previous()) {} * int32_t start = iter.getIndex() + 1; * diff --git a/thirdparty/icu4c/common/unicode/docmain.h b/thirdparty/icu4c/common/unicode/docmain.h index 4e29e283cd..1349f49703 100644 --- a/thirdparty/icu4c/common/unicode/docmain.h +++ b/thirdparty/icu4c/common/unicode/docmain.h @@ -149,8 +149,8 @@ * </tr> * <tr> * <td>Number Formatting<br/>(includes currency and unit formatting)</td> - * <td>unumberformatter.h, unum.h</td> - * <td>icu::number::NumberFormatter (ICU 60+) or icu::NumberFormat (older versions)</td> + * <td>unumberformatter.h, unum.h, usimplenumberformatter.h</td> + * <td>icu::number::NumberFormatter (ICU 60+) or icu::NumberFormat (older versions)<br>icu::number::SimpleNumberFormatter (ICU 73+)</td> * </tr> * <tr> * <td>Number Range Formatting<br />(includes currency and unit ranges)</td> diff --git a/thirdparty/icu4c/common/unicode/edits.h b/thirdparty/icu4c/common/unicode/edits.h index bfa07fa676..dda9d3ca75 100644 --- a/thirdparty/icu4c/common/unicode/edits.h +++ b/thirdparty/icu4c/common/unicode/edits.h @@ -77,7 +77,7 @@ class UnicodeString; * * @stable ICU 59 */ -class U_COMMON_API Edits U_FINAL : public UMemory { +class U_COMMON_API Edits final : public UMemory { public: /** * Constructs an empty object. @@ -103,7 +103,7 @@ public: * @param src source edits * @stable ICU 60 */ - Edits(Edits &&src) U_NOEXCEPT : + Edits(Edits &&src) noexcept : array(stackArray), capacity(STACK_CAPACITY), length(src.length), delta(src.delta), numChanges(src.numChanges), errorCode_(src.errorCode_) { @@ -132,13 +132,13 @@ public: * @return *this * @stable ICU 60 */ - Edits &operator=(Edits &&src) U_NOEXCEPT; + Edits &operator=(Edits &&src) noexcept; /** * Resets the data but may not release memory. * @stable ICU 59 */ - void reset() U_NOEXCEPT; + void reset() noexcept; /** * Adds a no-change edit: a record for an unchanged segment of text. @@ -200,7 +200,7 @@ public: * @see getFineIterator * @stable ICU 59 */ - struct U_COMMON_API Iterator U_FINAL : public UMemory { + struct U_COMMON_API Iterator final : public UMemory { /** * Default constructor, empty iterator. * @stable ICU 60 @@ -504,9 +504,9 @@ public: Edits &mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &errorCode); private: - void releaseArray() U_NOEXCEPT; + void releaseArray() noexcept; Edits ©Array(const Edits &other); - Edits &moveArray(Edits &src) U_NOEXCEPT; + Edits &moveArray(Edits &src) noexcept; void setLastUnit(int32_t last) { array[length - 1] = (uint16_t)last; } int32_t lastUnit() const { return length > 0 ? array[length - 1] : 0xffff; } diff --git a/thirdparty/icu4c/common/unicode/icuplug.h b/thirdparty/icu4c/common/unicode/icuplug.h index 205af360d4..c787fcd426 100644 --- a/thirdparty/icu4c/common/unicode/icuplug.h +++ b/thirdparty/icu4c/common/unicode/icuplug.h @@ -187,8 +187,12 @@ typedef enum { /** * Entrypoint for an ICU plugin. - * @param plug the UPlugData handle. - * @param status the plugin's extended status code. + * @param plug the UPlugData handle. + * @param reason the reason code for the entrypoint's call. + * @param status Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) * @return A valid plugin must return UPLUG_TOKEN * @internal ICU 4.4 Technology Preview */ diff --git a/thirdparty/icu4c/common/unicode/localematcher.h b/thirdparty/icu4c/common/unicode/localematcher.h index 0f7e04a3af..603daf7231 100644 --- a/thirdparty/icu4c/common/unicode/localematcher.h +++ b/thirdparty/icu4c/common/unicode/localematcher.h @@ -198,7 +198,7 @@ public: * @param src Result to move contents from. * @stable ICU 65 */ - Result(Result &&src) U_NOEXCEPT; + Result(Result &&src) noexcept; /** * Destructor. @@ -214,7 +214,7 @@ public: * @param src Result to move contents from. * @stable ICU 65 */ - Result &operator=(Result &&src) U_NOEXCEPT; + Result &operator=(Result &&src) noexcept; /** * Returns the best-matching desired locale. @@ -313,7 +313,7 @@ public: * @param src Builder to move contents from. * @stable ICU 65 */ - Builder(Builder &&src) U_NOEXCEPT; + Builder(Builder &&src) noexcept; /** * Destructor. @@ -329,7 +329,7 @@ public: * @param src Builder to move contents from. * @stable ICU 65 */ - Builder &operator=(Builder &&src) U_NOEXCEPT; + Builder &operator=(Builder &&src) noexcept; /** * Parses an Accept-Language string @@ -548,7 +548,7 @@ public: * @param src source matcher * @stable ICU 65 */ - LocaleMatcher(LocaleMatcher &&src) U_NOEXCEPT; + LocaleMatcher(LocaleMatcher &&src) noexcept; /** * Destructor. @@ -564,7 +564,7 @@ public: * @return *this * @stable ICU 65 */ - LocaleMatcher &operator=(LocaleMatcher &&src) U_NOEXCEPT; + LocaleMatcher &operator=(LocaleMatcher &&src) noexcept; /** * Returns the supported locale which best matches the desired locale. diff --git a/thirdparty/icu4c/common/unicode/localpointer.h b/thirdparty/icu4c/common/unicode/localpointer.h index 96c659d10a..b8be3d7942 100644 --- a/thirdparty/icu4c/common/unicode/localpointer.h +++ b/thirdparty/icu4c/common/unicode/localpointer.h @@ -79,7 +79,7 @@ public: * @param p simple pointer to an object that is adopted * @stable ICU 4.4 */ - explicit LocalPointerBase(T *p=NULL) : ptr(p) {} + explicit LocalPointerBase(T *p=nullptr) : ptr(p) {} /** * Destructor deletes the object it owns. * Subclass must override: Base class does nothing. @@ -87,20 +87,20 @@ public: */ ~LocalPointerBase() { /* delete ptr; */ } /** - * NULL check. - * @return true if ==NULL + * nullptr check. + * @return true if ==nullptr * @stable ICU 4.4 */ - UBool isNull() const { return ptr==NULL; } + UBool isNull() const { return ptr==nullptr; } /** - * NULL check. - * @return true if !=NULL + * nullptr check. + * @return true if !=nullptr * @stable ICU 4.4 */ - UBool isValid() const { return ptr!=NULL; } + UBool isValid() const { return ptr!=nullptr; } /** * Comparison with a simple pointer, so that existing code - * with ==NULL need not be changed. + * with ==nullptr need not be changed. * @param other simple pointer for comparison * @return true if this pointer value equals other * @stable ICU 4.4 @@ -108,7 +108,7 @@ public: bool operator==(const T *other) const { return ptr==other; } /** * Comparison with a simple pointer, so that existing code - * with !=NULL need not be changed. + * with !=nullptr need not be changed. * @param other simple pointer for comparison * @return true if this pointer value differs from other * @stable ICU 4.4 @@ -133,14 +133,14 @@ public: */ T *operator->() const { return ptr; } /** - * Gives up ownership; the internal pointer becomes NULL. + * Gives up ownership; the internal pointer becomes nullptr. * @return the pointer value; * caller becomes responsible for deleting the object * @stable ICU 4.4 */ T *orphan() { T *p=ptr; - ptr=NULL; + ptr=nullptr; return p; } /** @@ -197,9 +197,9 @@ public: * @param p simple pointer to an object that is adopted * @stable ICU 4.4 */ - explicit LocalPointer(T *p=NULL) : LocalPointerBase<T>(p) {} + explicit LocalPointer(T *p=nullptr) : LocalPointerBase<T>(p) {} /** - * Constructor takes ownership and reports an error if NULL. + * Constructor takes ownership and reports an error if nullptr. * * This constructor is intended to be used with other-class constructors * that may report a failure UErrorCode, @@ -208,11 +208,11 @@ public: * * @param p simple pointer to an object that is adopted * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR - * if p==NULL and no other failure code had been set + * if p==nullptr and no other failure code had been set * @stable ICU 55 */ LocalPointer(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) { - if(p==NULL && U_SUCCESS(errorCode)) { + if(p==nullptr && U_SUCCESS(errorCode)) { errorCode=U_MEMORY_ALLOCATION_ERROR; } } @@ -221,8 +221,8 @@ public: * @param src source smart pointer * @stable ICU 56 */ - LocalPointer(LocalPointer<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) { - src.ptr=NULL; + LocalPointer(LocalPointer<T> &&src) noexcept : LocalPointerBase<T>(src.ptr) { + src.ptr=nullptr; } /** @@ -252,10 +252,10 @@ public: * @return *this * @stable ICU 56 */ - LocalPointer<T> &operator=(LocalPointer<T> &&src) U_NOEXCEPT { + LocalPointer<T> &operator=(LocalPointer<T> &&src) noexcept { delete LocalPointerBase<T>::ptr; LocalPointerBase<T>::ptr=src.ptr; - src.ptr=NULL; + src.ptr=nullptr; return *this; } @@ -267,7 +267,7 @@ public: * @return *this * @stable ICU 64 */ - LocalPointer<T> &operator=(std::unique_ptr<T> &&p) U_NOEXCEPT { + LocalPointer<T> &operator=(std::unique_ptr<T> &&p) noexcept { adoptInstead(p.release()); return *this; } @@ -277,7 +277,7 @@ public: * @param other other smart pointer * @stable ICU 56 */ - void swap(LocalPointer<T> &other) U_NOEXCEPT { + void swap(LocalPointer<T> &other) noexcept { T *temp=LocalPointerBase<T>::ptr; LocalPointerBase<T>::ptr=other.ptr; other.ptr=temp; @@ -288,7 +288,7 @@ public: * @param p2 will get p1's pointer * @stable ICU 56 */ - friend inline void swap(LocalPointer<T> &p1, LocalPointer<T> &p2) U_NOEXCEPT { + friend inline void swap(LocalPointer<T> &p1, LocalPointer<T> &p2) noexcept { p1.swap(p2); } /** @@ -307,20 +307,20 @@ public: * * If U_FAILURE(errorCode), then the current object is retained and the new one deleted. * - * If U_SUCCESS(errorCode) but the input pointer is NULL, + * If U_SUCCESS(errorCode) but the input pointer is nullptr, * then U_MEMORY_ALLOCATION_ERROR is set, - * the current object is deleted, and NULL is set. + * the current object is deleted, and nullptr is set. * * @param p simple pointer to an object that is adopted * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR - * if p==NULL and no other failure code had been set + * if p==nullptr and no other failure code had been set * @stable ICU 55 */ void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) { if(U_SUCCESS(errorCode)) { delete LocalPointerBase<T>::ptr; LocalPointerBase<T>::ptr=p; - if(p==NULL) { + if(p==nullptr) { errorCode=U_MEMORY_ALLOCATION_ERROR; } } else { @@ -372,9 +372,9 @@ public: * @param p simple pointer to an array of T objects that is adopted * @stable ICU 4.4 */ - explicit LocalArray(T *p=NULL) : LocalPointerBase<T>(p) {} + explicit LocalArray(T *p=nullptr) : LocalPointerBase<T>(p) {} /** - * Constructor takes ownership and reports an error if NULL. + * Constructor takes ownership and reports an error if nullptr. * * This constructor is intended to be used with other-class constructors * that may report a failure UErrorCode, @@ -383,11 +383,11 @@ public: * * @param p simple pointer to an array of T objects that is adopted * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR - * if p==NULL and no other failure code had been set + * if p==nullptr and no other failure code had been set * @stable ICU 56 */ LocalArray(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) { - if(p==NULL && U_SUCCESS(errorCode)) { + if(p==nullptr && U_SUCCESS(errorCode)) { errorCode=U_MEMORY_ALLOCATION_ERROR; } } @@ -396,8 +396,8 @@ public: * @param src source smart pointer * @stable ICU 56 */ - LocalArray(LocalArray<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) { - src.ptr=NULL; + LocalArray(LocalArray<T> &&src) noexcept : LocalPointerBase<T>(src.ptr) { + src.ptr=nullptr; } /** @@ -427,10 +427,10 @@ public: * @return *this * @stable ICU 56 */ - LocalArray<T> &operator=(LocalArray<T> &&src) U_NOEXCEPT { + LocalArray<T> &operator=(LocalArray<T> &&src) noexcept { delete[] LocalPointerBase<T>::ptr; LocalPointerBase<T>::ptr=src.ptr; - src.ptr=NULL; + src.ptr=nullptr; return *this; } @@ -442,7 +442,7 @@ public: * @return *this * @stable ICU 64 */ - LocalArray<T> &operator=(std::unique_ptr<T[]> &&p) U_NOEXCEPT { + LocalArray<T> &operator=(std::unique_ptr<T[]> &&p) noexcept { adoptInstead(p.release()); return *this; } @@ -452,7 +452,7 @@ public: * @param other other smart pointer * @stable ICU 56 */ - void swap(LocalArray<T> &other) U_NOEXCEPT { + void swap(LocalArray<T> &other) noexcept { T *temp=LocalPointerBase<T>::ptr; LocalPointerBase<T>::ptr=other.ptr; other.ptr=temp; @@ -463,7 +463,7 @@ public: * @param p2 will get p1's pointer * @stable ICU 56 */ - friend inline void swap(LocalArray<T> &p1, LocalArray<T> &p2) U_NOEXCEPT { + friend inline void swap(LocalArray<T> &p1, LocalArray<T> &p2) noexcept { p1.swap(p2); } /** @@ -482,20 +482,20 @@ public: * * If U_FAILURE(errorCode), then the current array is retained and the new one deleted. * - * If U_SUCCESS(errorCode) but the input pointer is NULL, + * If U_SUCCESS(errorCode) but the input pointer is nullptr, * then U_MEMORY_ALLOCATION_ERROR is set, - * the current array is deleted, and NULL is set. + * the current array is deleted, and nullptr is set. * * @param p simple pointer to an array of T objects that is adopted * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR - * if p==NULL and no other failure code had been set + * if p==nullptr and no other failure code had been set * @stable ICU 56 */ void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) { if(U_SUCCESS(errorCode)) { delete[] LocalPointerBase<T>::ptr; LocalPointerBase<T>::ptr=p; - if(p==NULL) { + if(p==nullptr) { errorCode=U_MEMORY_ALLOCATION_ERROR; } } else { @@ -552,19 +552,19 @@ public: public: \ using LocalPointerBase<Type>::operator*; \ using LocalPointerBase<Type>::operator->; \ - explicit LocalPointerClassName(Type *p=NULL) : LocalPointerBase<Type>(p) {} \ - LocalPointerClassName(LocalPointerClassName &&src) U_NOEXCEPT \ + explicit LocalPointerClassName(Type *p=nullptr) : LocalPointerBase<Type>(p) {} \ + LocalPointerClassName(LocalPointerClassName &&src) noexcept \ : LocalPointerBase<Type>(src.ptr) { \ - src.ptr=NULL; \ + src.ptr=nullptr; \ } \ /* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */ \ explicit LocalPointerClassName(std::unique_ptr<Type, decltype(&closeFunction)> &&p) \ : LocalPointerBase<Type>(p.release()) {} \ - ~LocalPointerClassName() { if (ptr != NULL) { closeFunction(ptr); } } \ - LocalPointerClassName &operator=(LocalPointerClassName &&src) U_NOEXCEPT { \ - if (ptr != NULL) { closeFunction(ptr); } \ + ~LocalPointerClassName() { if (ptr != nullptr) { closeFunction(ptr); } } \ + LocalPointerClassName &operator=(LocalPointerClassName &&src) noexcept { \ + if (ptr != nullptr) { closeFunction(ptr); } \ LocalPointerBase<Type>::ptr=src.ptr; \ - src.ptr=NULL; \ + src.ptr=nullptr; \ return *this; \ } \ /* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */ \ @@ -572,16 +572,16 @@ public: adoptInstead(p.release()); \ return *this; \ } \ - void swap(LocalPointerClassName &other) U_NOEXCEPT { \ + void swap(LocalPointerClassName &other) noexcept { \ Type *temp=LocalPointerBase<Type>::ptr; \ LocalPointerBase<Type>::ptr=other.ptr; \ other.ptr=temp; \ } \ - friend inline void swap(LocalPointerClassName &p1, LocalPointerClassName &p2) U_NOEXCEPT { \ + friend inline void swap(LocalPointerClassName &p1, LocalPointerClassName &p2) noexcept { \ p1.swap(p2); \ } \ void adoptInstead(Type *p) { \ - if (ptr != NULL) { closeFunction(ptr); } \ + if (ptr != nullptr) { closeFunction(ptr); } \ ptr=p; \ } \ operator std::unique_ptr<Type, decltype(&closeFunction)> () && { \ diff --git a/thirdparty/icu4c/common/unicode/locid.h b/thirdparty/icu4c/common/unicode/locid.h index 2f2b3998a7..a6fbbb7041 100644 --- a/thirdparty/icu4c/common/unicode/locid.h +++ b/thirdparty/icu4c/common/unicode/locid.h @@ -258,7 +258,7 @@ public: * @param language Lowercase two-letter or three-letter ISO-639 code. * This parameter can instead be an ICU style C locale (e.g. "en_US"), * but the other parameters must not be used. - * This parameter can be NULL; if so, + * This parameter can be nullptr; if so, * the locale is initialized to match the current default locale. * (This is the same as using the default constructor.) * Please note: The Java Locale class does NOT accept the form @@ -294,7 +294,7 @@ public: * @param other The Locale object being moved in. * @stable ICU 63 */ - Locale(Locale&& other) U_NOEXCEPT; + Locale(Locale&& other) noexcept; /** * Destructor @@ -320,7 +320,7 @@ public: * @return *this * @stable ICU 63 */ - Locale& operator=(Locale&& other) U_NOEXCEPT; + Locale& operator=(Locale&& other) noexcept; /** * Checks if two locale keys are the same. @@ -344,7 +344,7 @@ public: /** * Clone this object. * Clones can be used concurrently in multiple threads. - * If an error occurs, then NULL is returned. + * If an error occurs, then nullptr is returned. * The caller must delete the clone. * * @return a clone of this object @@ -378,7 +378,7 @@ public: * setDefault() only changes ICU's default locale ID, <strong>not</strong> * the default locale ID of the runtime environment. * - * @param newLocale Locale to set to. If NULL, set to the value obtained + * @param newLocale Locale to set to. If nullptr, set to the value obtained * from the runtime environment. * @param success The error code. * @system @@ -453,7 +453,7 @@ public: /** * Creates a locale from the given string after canonicalizing * the string according to CLDR by calling uloc_canonicalize(). - * @param name the locale ID to create from. Must not be NULL. + * @param name the locale ID to create from. Must not be nullptr. * @return a new locale object corresponding to the given name * @stable ICU 3.0 * @see uloc_canonicalize @@ -583,7 +583,7 @@ public: * Gets the list of keywords for the specified locale. * * @param status the status code - * @return pointer to StringEnumeration class, or NULL if there are no keywords. + * @return pointer to StringEnumeration class, or nullptr if there are no keywords. * Client must dispose of it by calling delete. * @see getKeywords * @stable ICU 2.8 @@ -594,7 +594,7 @@ public: * Gets the list of Unicode keywords for the specified locale. * * @param status the status code - * @return pointer to StringEnumeration class, or NULL if there are no keywords. + * @return pointer to StringEnumeration class, or nullptr if there are no keywords. * Client must dispose of it by calling delete. * @see getUnicodeKeywords * @stable ICU 63 @@ -722,7 +722,7 @@ public: * * @param keywordName name of the keyword to be set. Case insensitive. * @param keywordValue value of the keyword to be set. If 0-length or - * NULL, will result in the keyword being removed. No error is given if + * nullptr, will result in the keyword being removed. No error is given if * that keyword does not exist. * @param status Returns any error information while performing this operation. * @@ -743,7 +743,7 @@ public: * * @param keywordName name of the keyword to be set. * @param keywordValue value of the keyword to be set. If 0-length or - * NULL, will result in the keyword being removed. No error is given if + * nullptr, will result in the keyword being removed. No error is given if * that keyword does not exist. * @param status Returns any error information while performing this operation. * @stable ICU 63 @@ -763,7 +763,7 @@ public: * * @param keywordName name of the keyword to be set. * @param keywordValue value of the keyword to be set. If 0-length or - * NULL, will result in the keyword being removed. No error is given if + * nullptr, will result in the keyword being removed. No error is given if * that keyword does not exist. * @param status Returns any error information while performing this operation. * @stable ICU 63 diff --git a/thirdparty/icu4c/common/unicode/messagepattern.h b/thirdparty/icu4c/common/unicode/messagepattern.h index 4c5be13dbc..55b09bfbd4 100644 --- a/thirdparty/icu4c/common/unicode/messagepattern.h +++ b/thirdparty/icu4c/common/unicode/messagepattern.h @@ -388,7 +388,7 @@ public: * @param pattern a MessageFormat pattern string * @param parseError Struct to receive information on the position * of an error within the pattern. - * Can be NULL. + * Can be nullptr. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns * immediately. Check for U_FAILURE() on output or use with @@ -428,7 +428,7 @@ public: * @param pattern a MessageFormat pattern string * @param parseError Struct to receive information on the position * of an error within the pattern. - * Can be NULL. + * Can be nullptr. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns * immediately. Check for U_FAILURE() on output or use with @@ -448,7 +448,7 @@ public: * @param pattern a ChoiceFormat pattern string * @param parseError Struct to receive information on the position * of an error within the pattern. - * Can be NULL. + * Can be nullptr. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns * immediately. Check for U_FAILURE() on output or use with @@ -468,7 +468,7 @@ public: * @param pattern a PluralFormat pattern string * @param parseError Struct to receive information on the position * of an error within the pattern. - * Can be NULL. + * Can be nullptr. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns * immediately. Check for U_FAILURE() on output or use with @@ -488,7 +488,7 @@ public: * @param pattern a SelectFormat pattern string * @param parseError Struct to receive information on the position * of an error within the pattern. - * Can be NULL. + * Can be nullptr. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns * immediately. Check for U_FAILURE() on output or use with diff --git a/thirdparty/icu4c/common/unicode/normalizer2.h b/thirdparty/icu4c/common/unicode/normalizer2.h index 2d355250c2..972894ec42 100644 --- a/thirdparty/icu4c/common/unicode/normalizer2.h +++ b/thirdparty/icu4c/common/unicode/normalizer2.h @@ -92,7 +92,7 @@ public: /** * Returns a Normalizer2 instance for Unicode NFC normalization. - * Same as getInstance(NULL, "nfc", UNORM2_COMPOSE, errorCode). + * Same as getInstance(nullptr, "nfc", UNORM2_COMPOSE, errorCode). * Returns an unmodifiable singleton instance. Do not delete it. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns @@ -106,7 +106,7 @@ public: /** * Returns a Normalizer2 instance for Unicode NFD normalization. - * Same as getInstance(NULL, "nfc", UNORM2_DECOMPOSE, errorCode). + * Same as getInstance(nullptr, "nfc", UNORM2_DECOMPOSE, errorCode). * Returns an unmodifiable singleton instance. Do not delete it. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns @@ -120,7 +120,7 @@ public: /** * Returns a Normalizer2 instance for Unicode NFKC normalization. - * Same as getInstance(NULL, "nfkc", UNORM2_COMPOSE, errorCode). + * Same as getInstance(nullptr, "nfkc", UNORM2_COMPOSE, errorCode). * Returns an unmodifiable singleton instance. Do not delete it. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns @@ -134,7 +134,7 @@ public: /** * Returns a Normalizer2 instance for Unicode NFKD normalization. - * Same as getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, errorCode). + * Same as getInstance(nullptr, "nfkc", UNORM2_DECOMPOSE, errorCode). * Returns an unmodifiable singleton instance. Do not delete it. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns @@ -148,7 +148,7 @@ public: /** * Returns a Normalizer2 instance for Unicode NFKC_Casefold normalization. - * Same as getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, errorCode). + * Same as getInstance(nullptr, "nfkc_cf", UNORM2_COMPOSE, errorCode). * Returns an unmodifiable singleton instance. Do not delete it. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns @@ -166,12 +166,12 @@ public: * and which composes or decomposes text according to the specified mode. * Returns an unmodifiable singleton instance. Do not delete it. * - * Use packageName=NULL for data files that are part of ICU's own data. + * Use packageName=nullptr for data files that are part of ICU's own data. * Use name="nfc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFC/NFD. * Use name="nfkc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFKC/NFKD. * Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold. * - * @param packageName NULL for ICU built-in data, otherwise application data package name + * @param packageName nullptr for ICU built-in data, otherwise application data package name * @param name "nfc" or "nfkc" or "nfkc_cf" or name of custom data file * @param mode normalization mode (compose or decompose etc.) * @param errorCode Standard ICU error code. Its input value must @@ -533,7 +533,7 @@ public: virtual UnicodeString & normalize(const UnicodeString &src, UnicodeString &dest, - UErrorCode &errorCode) const U_OVERRIDE; + UErrorCode &errorCode) const override; /** * Normalizes a UTF-8 string and optionally records how source substrings @@ -559,7 +559,7 @@ public: */ virtual void normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink, - Edits *edits, UErrorCode &errorCode) const U_OVERRIDE; + Edits *edits, UErrorCode &errorCode) const override; /** * Appends the normalized form of the second string to the first string @@ -578,7 +578,7 @@ public: virtual UnicodeString & normalizeSecondAndAppend(UnicodeString &first, const UnicodeString &second, - UErrorCode &errorCode) const U_OVERRIDE; + UErrorCode &errorCode) const override; /** * Appends the second string to the first string * (merging them at the boundary) and returns the first string. @@ -596,7 +596,7 @@ public: virtual UnicodeString & append(UnicodeString &first, const UnicodeString &second, - UErrorCode &errorCode) const U_OVERRIDE; + UErrorCode &errorCode) const override; /** * Gets the decomposition mapping of c. @@ -610,7 +610,7 @@ public: * @stable ICU 4.6 */ virtual UBool - getDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE; + getDecomposition(UChar32 c, UnicodeString &decomposition) const override; /** * Gets the raw decomposition mapping of c. @@ -624,7 +624,7 @@ public: * @stable ICU 49 */ virtual UBool - getRawDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE; + getRawDecomposition(UChar32 c, UnicodeString &decomposition) const override; /** * Performs pairwise composition of a & b and returns the composite if there is one. @@ -637,7 +637,7 @@ public: * @stable ICU 49 */ virtual UChar32 - composePair(UChar32 a, UChar32 b) const U_OVERRIDE; + composePair(UChar32 a, UChar32 b) const override; /** * Gets the combining class of c. @@ -648,7 +648,7 @@ public: * @stable ICU 49 */ virtual uint8_t - getCombiningClass(UChar32 c) const U_OVERRIDE; + getCombiningClass(UChar32 c) const override; /** * Tests if the string is normalized. @@ -662,7 +662,7 @@ public: * @stable ICU 4.4 */ virtual UBool - isNormalized(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE; + isNormalized(const UnicodeString &s, UErrorCode &errorCode) const override; /** * Tests if the UTF-8 string is normalized. * Internally, in cases where the quickCheck() method would return "maybe" @@ -683,7 +683,7 @@ public: * @stable ICU 60 */ virtual UBool - isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const U_OVERRIDE; + isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const override; /** * Tests if the string is normalized. * For details see the Normalizer2 base class documentation. @@ -696,7 +696,7 @@ public: * @stable ICU 4.4 */ virtual UNormalizationCheckResult - quickCheck(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE; + quickCheck(const UnicodeString &s, UErrorCode &errorCode) const override; /** * Returns the end of the normalized substring of the input string. * For details see the Normalizer2 base class documentation. @@ -709,7 +709,7 @@ public: * @stable ICU 4.4 */ virtual int32_t - spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE; + spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const override; /** * Tests if the character always has a normalization boundary before it, @@ -719,7 +719,7 @@ public: * @return true if c has a normalization boundary before it * @stable ICU 4.4 */ - virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE; + virtual UBool hasBoundaryBefore(UChar32 c) const override; /** * Tests if the character always has a normalization boundary after it, @@ -729,7 +729,7 @@ public: * @return true if c has a normalization boundary after it * @stable ICU 4.4 */ - virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE; + virtual UBool hasBoundaryAfter(UChar32 c) const override; /** * Tests if the character is normalization-inert. @@ -738,7 +738,7 @@ public: * @return true if c is normalization-inert * @stable ICU 4.4 */ - virtual UBool isInert(UChar32 c) const U_OVERRIDE; + virtual UBool isInert(UChar32 c) const override; private: UnicodeString & normalize(const UnicodeString &src, diff --git a/thirdparty/icu4c/common/unicode/normlzr.h b/thirdparty/icu4c/common/unicode/normlzr.h index 14b2469885..03a7aa080d 100644 --- a/thirdparty/icu4c/common/unicode/normlzr.h +++ b/thirdparty/icu4c/common/unicode/normlzr.h @@ -755,7 +755,7 @@ private: // Private data //------------------------------------------------------------------------- - FilteredNormalizer2*fFilteredNorm2; // owned if not NULL + FilteredNormalizer2*fFilteredNorm2; // owned if not nullptr const Normalizer2 *fNorm2; // not owned; may be equal to fFilteredNorm2 UNormalizationMode fUMode; // deprecated int32_t fOptions; diff --git a/thirdparty/icu4c/common/unicode/parsepos.h b/thirdparty/icu4c/common/unicode/parsepos.h index 73945f5f97..d33a812ad0 100644 --- a/thirdparty/icu4c/common/unicode/parsepos.h +++ b/thirdparty/icu4c/common/unicode/parsepos.h @@ -112,7 +112,7 @@ public: /** * Clone this object. * Clones can be used concurrently in multiple threads. - * If an error occurs, then NULL is returned. + * If an error occurs, then nullptr is returned. * The caller must delete the clone. * * @return a clone of this object diff --git a/thirdparty/icu4c/common/unicode/platform.h b/thirdparty/icu4c/common/unicode/platform.h index 1605226a79..a997843660 100644 --- a/thirdparty/icu4c/common/unicode/platform.h +++ b/thirdparty/icu4c/common/unicode/platform.h @@ -460,6 +460,13 @@ # define UPRV_HAS_WARNING(x) 0 #endif + +#if defined(__clang__) +#define UPRV_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined"))) +#else +#define UPRV_NO_SANITIZE_UNDEFINED +#endif + /** * \def U_MALLOC_ATTR * Attribute to mark functions as malloc-like @@ -509,26 +516,6 @@ # define U_CPLUSPLUS_VERSION 1 #endif -#if (U_PLATFORM == U_PF_AIX || U_PLATFORM == U_PF_OS390) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11) -// add in std::nullptr_t -namespace std { - typedef decltype(nullptr) nullptr_t; -}; -#endif - -/** - * \def U_NOEXCEPT - * "noexcept" if supported, otherwise empty. - * Some code, especially STL containers, uses move semantics of objects only - * if the move constructor and the move operator are declared as not throwing exceptions. - * @internal - */ -#ifdef U_NOEXCEPT - /* Use the predefined value. */ -#else -# define U_NOEXCEPT noexcept -#endif - /** * \def U_FALLTHROUGH * Annotate intentional fall-through between switch labels. @@ -757,7 +744,7 @@ namespace std { * \def U_HAVE_CHAR16_T * Defines whether the char16_t type is available for UTF-16 * and u"abc" UTF-16 string literals are supported. - * This is a new standard type and standard string literal syntax in C++0x + * This is a new standard type and standard string literal syntax in C++11 * but has been available in some compilers before. * @internal */ @@ -766,12 +753,6 @@ namespace std { #else /* * Notes: - * Visual Studio 2010 (_MSC_VER==1600) defines char16_t as a typedef - * and does not support u"abc" string literals. - * Visual Studio 2015 (_MSC_VER>=1900) and above adds support for - * both char16_t and u"abc" string literals. - * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but - * does not support u"abc" string literals. * C++11 and C11 require support for UTF-16 literals * TODO: Fix for plain C. Doesn't work on Mac. */ diff --git a/thirdparty/icu4c/common/unicode/rbbi.h b/thirdparty/icu4c/common/unicode/rbbi.h index d878243e3f..418b52e41f 100644 --- a/thirdparty/icu4c/common/unicode/rbbi.h +++ b/thirdparty/icu4c/common/unicode/rbbi.h @@ -54,14 +54,14 @@ class UStack; * * <p>This class is not intended to be subclassed.</p> */ -class U_COMMON_API RuleBasedBreakIterator /*U_FINAL*/ : public BreakIterator { +class U_COMMON_API RuleBasedBreakIterator /*final*/ : public BreakIterator { private: /** * The UText through which this BreakIterator accesses the text * @internal (private) */ - UText fText; + UText fText = UTEXT_INITIALIZER; #ifndef U_HIDE_INTERNAL_API public: @@ -71,32 +71,38 @@ public: * Not for general use; Public only for testing purposes. * @internal */ - RBBIDataWrapper *fData; + RBBIDataWrapper *fData = nullptr; + private: + /** + * The saved error code associated with this break iterator. + * This is the value to be returned by copyErrorTo(). + */ + UErrorCode fErrorCode = U_ZERO_ERROR; /** * The current position of the iterator. Pinned, 0 < fPosition <= text.length. * Never has the value UBRK_DONE (-1). */ - int32_t fPosition; + int32_t fPosition = 0; /** * TODO: */ - int32_t fRuleStatusIndex; + int32_t fRuleStatusIndex = 0; /** * Cache of previously determined boundary positions. */ class BreakCache; - BreakCache *fBreakCache; + BreakCache *fBreakCache = nullptr; /** * Cache of boundary positions within a region of text that has been * sub-divided by dictionary based breaking. */ class DictionaryCache; - DictionaryCache *fDictionaryCache; + DictionaryCache *fDictionaryCache = nullptr; /** * @@ -105,7 +111,7 @@ private: * handle a given character. * @internal (private) */ - UStack *fLanguageBreakEngines; + UStack *fLanguageBreakEngines = nullptr; /** * @@ -114,43 +120,43 @@ private: * LanguageBreakEngine. * @internal (private) */ - UnhandledEngine *fUnhandledBreakEngine; + UnhandledEngine *fUnhandledBreakEngine = nullptr; /** * Counter for the number of characters encountered with the "dictionary" * flag set. * @internal (private) */ - uint32_t fDictionaryCharCount; + uint32_t fDictionaryCharCount = 0; /** * A character iterator that refers to the same text as the UText, above. * Only included for compatibility with old API, which was based on CharacterIterators. * Value may be adopted from outside, or one of fSCharIter or fDCharIter, below. */ - CharacterIterator *fCharIter; + CharacterIterator *fCharIter = &fSCharIter; /** * When the input text is provided by a UnicodeString, this will point to * a characterIterator that wraps that data. Needed only for the * implementation of getText(), a backwards compatibility issue. */ - StringCharacterIterator fSCharIter; + UCharCharacterIterator fSCharIter {u"", 0}; /** * True when iteration has run off the end, and iterator functions should return UBRK_DONE. */ - UBool fDone; + bool fDone = false; /** * Array of look-ahead tentative results. */ - int32_t *fLookAheadMatches; + int32_t *fLookAheadMatches = nullptr; /** * A flag to indicate if phrase based breaking is enabled. */ - UBool fIsPhraseBreaking; + UBool fIsPhraseBreaking = false; //======================================================================= // constructors @@ -188,10 +194,19 @@ private: /** @internal */ friend class BreakIterator; + /** + * Default constructor with an error code parameter. + * Aside from error handling, otherwise identical to the default constructor. + * Internally, handles common initialization for other constructors. + * @internal (private) + */ + RuleBasedBreakIterator(UErrorCode *status); + public: /** Default constructor. Creates an empty shell of an iterator, with no - * rules or text to iterate over. Object can subsequently be assigned to. + * rules or text to iterate over. Object can subsequently be assigned to, + * but is otherwise unusable. * @stable ICU 2.2 */ RuleBasedBreakIterator(); @@ -289,7 +304,9 @@ public: * @return true if both BreakIterators are not same. * @stable ICU 2.0 */ - inline bool operator!=(const BreakIterator& that) const; + inline bool operator!=(const BreakIterator& that) const { + return !operator==(that); + } /** * Returns a newly-constructed RuleBasedBreakIterator with the same @@ -335,8 +352,7 @@ public: * </p> * <p> * When the break iterator is operating on text supplied via a UText, - * this function will fail. Lacking any way to signal failures, it - * returns an CharacterIterator containing no text. + * this function will fail, returning a CharacterIterator containing no text. * The function getUText() provides similar functionality, * is reliable, and is more efficient. * </p> @@ -356,7 +372,7 @@ public: * access the text without impacting any break iterator operations, * but the underlying text itself must not be altered. * - * @param fillIn A UText to be filled in. If NULL, a new UText will be + * @param fillIn A UText to be filled in. If nullptr, a new UText will be * allocated to hold the result. * @param status receives any error codes. * @return The current UText for this break iterator. If an input @@ -576,7 +592,7 @@ public: * tricky. Use clone() instead. * * @param stackBuffer The pointer to the memory into which the cloned object - * should be placed. If NULL, allocate heap memory + * should be placed. If nullptr, allocate heap memory * for the cloned object. * @param BufferSize The size of the buffer. If zero, return the required * buffer size, but do not clone the object. If the @@ -649,12 +665,6 @@ private: // implementation //======================================================================= /** - * Common initialization function, used by constructors and bufferClone. - * @internal (private) - */ - void init(UErrorCode &status); - - /** * Iterate backwards from an arbitrary position in the input text using the * synthesized Safe Reverse rules. * This locates a "Safe Position" from which the forward break rules @@ -726,16 +736,6 @@ private: #endif /* U_HIDE_INTERNAL_API */ }; -//------------------------------------------------------------------------------ -// -// Inline Functions Definitions ... -// -//------------------------------------------------------------------------------ - -inline bool RuleBasedBreakIterator::operator!=(const BreakIterator& that) const { - return !operator==(that); -} - U_NAMESPACE_END #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ diff --git a/thirdparty/icu4c/common/unicode/rep.h b/thirdparty/icu4c/common/unicode/rep.h index 6dd4530647..7115c97b82 100644 --- a/thirdparty/icu4c/common/unicode/rep.h +++ b/thirdparty/icu4c/common/unicode/rep.h @@ -192,7 +192,7 @@ public: * Clone this object, an instance of a subclass of Replaceable. * Clones can be used concurrently in multiple threads. * If a subclass does not implement clone(), or if an error occurs, - * then NULL is returned. + * then nullptr is returned. * The caller must delete the clone. * * @return a clone of this object diff --git a/thirdparty/icu4c/common/unicode/resbund.h b/thirdparty/icu4c/common/unicode/resbund.h index 6e26a40591..30fc2ac0ab 100644 --- a/thirdparty/icu4c/common/unicode/resbund.h +++ b/thirdparty/icu4c/common/unicode/resbund.h @@ -143,7 +143,7 @@ public: * or equivalent. Typically, packageName will refer to a (.dat) file, or to * a package registered with udata_setAppData(). Using a full file or directory * pathname for packageName is deprecated. - * NULL is used to refer to ICU data. + * nullptr is used to refer to ICU data. * @param locale The locale for which to open a resource bundle. * @param err A UErrorCode value * @stable ICU 2.0 @@ -189,7 +189,7 @@ public: /** * Clone this object. * Clones can be used concurrently in multiple threads. - * If an error occurs, then NULL is returned. + * If an error occurs, then nullptr is returned. * The caller must delete the clone. * * @return a clone of this object @@ -304,7 +304,7 @@ public: * Returns the key associated with this resource. Not all the resources have a key - only * those that are members of a table. * - * @return a key associated to this resource, or NULL if it doesn't have a key + * @return a key associated to this resource, or nullptr if it doesn't have a key * @stable ICU 2.0 */ const char* @@ -331,7 +331,7 @@ public: getType(void) const; /** - * Returns the next resource in a given resource or NULL if there are no more resources + * Returns the next resource in a given resource or nullptr if there are no more resources * * @param status fills in the outgoing error code * @return ResourceBundle object. @@ -341,7 +341,7 @@ public: getNext(UErrorCode& status); /** - * Returns the next string in a resource or NULL if there are no more resources + * Returns the next string in a resource or nullptr if there are no more resources * to iterate over. * * @param status fills in the outgoing error code @@ -352,7 +352,7 @@ public: getNextString(UErrorCode& status); /** - * Returns the next string in a resource or NULL if there are no more resources + * Returns the next string in a resource or nullptr if there are no more resources * to iterate over. * * @param key fill in for key associated with this string diff --git a/thirdparty/icu4c/common/unicode/simpleformatter.h b/thirdparty/icu4c/common/unicode/simpleformatter.h index 6d9c04ace2..7f58106fad 100644 --- a/thirdparty/icu4c/common/unicode/simpleformatter.h +++ b/thirdparty/icu4c/common/unicode/simpleformatter.h @@ -59,7 +59,7 @@ class SimpleModifier; * @see UMessagePatternApostropheMode * @stable ICU 57 */ -class U_COMMON_API SimpleFormatter U_FINAL : public UMemory { +class U_COMMON_API SimpleFormatter final : public UMemory { public: /** * Default constructor. @@ -217,13 +217,13 @@ public: * * @param values The argument values. * An argument value must not be the same object as appendTo. - * Can be NULL if valuesLength==getArgumentLimit()==0. + * Can be nullptr if valuesLength==getArgumentLimit()==0. * @param valuesLength The length of the values array. * Must be at least getArgumentLimit(). * @param appendTo Gets the formatted pattern and values appended. * @param offsets offsets[i] receives the offset of where * values[i] replaced pattern argument {i}. - * Can be shorter or longer than values. Can be NULL if offsetsLength==0. + * Can be shorter or longer than values. Can be nullptr if offsetsLength==0. * If there is no {i} in the pattern, then offsets[i] is set to -1. * @param offsetsLength The length of the offsets array. * @param errorCode ICU error code in/out parameter. @@ -243,13 +243,13 @@ public: * * @param values The argument values. * An argument value may be the same object as result. - * Can be NULL if valuesLength==getArgumentLimit()==0. + * Can be nullptr if valuesLength==getArgumentLimit()==0. * @param valuesLength The length of the values array. * Must be at least getArgumentLimit(). * @param result Gets its contents replaced by the formatted pattern and values. * @param offsets offsets[i] receives the offset of where * values[i] replaced pattern argument {i}. - * Can be shorter or longer than values. Can be NULL if offsetsLength==0. + * Can be shorter or longer than values. Can be nullptr if offsetsLength==0. * If there is no {i} in the pattern, then offsets[i] is set to -1. * @param offsetsLength The length of the offsets array. * @param errorCode ICU error code in/out parameter. diff --git a/thirdparty/icu4c/common/unicode/strenum.h b/thirdparty/icu4c/common/unicode/strenum.h index 1d1b37940a..fba5c9b814 100644 --- a/thirdparty/icu4c/common/unicode/strenum.h +++ b/thirdparty/icu4c/common/unicode/strenum.h @@ -70,7 +70,7 @@ public: * Clone this object, an instance of a subclass of StringEnumeration. * Clones can be used concurrently in multiple threads. * If a subclass does not implement clone(), or if an error occurs, - * then NULL is returned. + * then nullptr is returned. * The caller must delete the clone. * * @return a clone of this object @@ -101,8 +101,8 @@ public: /** * <p>Returns the next element as a NUL-terminated char*. If there - * are no more elements, returns NULL. If the resultLength pointer - * is not NULL, the length of the string (not counting the + * are no more elements, returns nullptr. If the resultLength pointer + * is not nullptr, the length of the string (not counting the * terminating NUL) is returned at that address. If an error * status is returned, the value at resultLength is undefined.</p> * @@ -111,21 +111,21 @@ public: * to next, unext, snext, reset, or the enumerator's destructor.</p> * * <p>If the iterator is out of sync with its service, status is set - * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p> + * to U_ENUM_OUT_OF_SYNC_ERROR and nullptr is returned.</p> * * <p>If the native service string is a char16_t* string, it is * converted to char* with the invariant converter. If the * conversion fails (because a character cannot be converted) then * status is set to U_INVARIANT_CONVERSION_ERROR and the return - * value is undefined (though not NULL).</p> + * value is undefined (though not nullptr).</p> * * Starting with ICU 2.8, the default implementation calls snext() * and handles the conversion. * Either next() or snext() must be implemented differently by a subclass. * * @param status the error code. - * @param resultLength a pointer to receive the length, can be NULL. - * @return a pointer to the string, or NULL. + * @param resultLength a pointer to receive the length, can be nullptr. + * @return a pointer to the string, or nullptr. * * @stable ICU 2.4 */ @@ -133,8 +133,8 @@ public: /** * <p>Returns the next element as a NUL-terminated char16_t*. If there - * are no more elements, returns NULL. If the resultLength pointer - * is not NULL, the length of the string (not counting the + * are no more elements, returns nullptr. If the resultLength pointer + * is not nullptr, the length of the string (not counting the * terminating NUL) is returned at that address. If an error * status is returned, the value at resultLength is undefined.</p> * @@ -143,14 +143,14 @@ public: * to next, unext, snext, reset, or the enumerator's destructor.</p> * * <p>If the iterator is out of sync with its service, status is set - * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p> + * to U_ENUM_OUT_OF_SYNC_ERROR and nullptr is returned.</p> * * Starting with ICU 2.8, the default implementation calls snext() * and handles the conversion. * * @param status the error code. - * @param resultLength a pointer to receive the length, can be NULL. - * @return a pointer to the string, or NULL. + * @param resultLength a pointer to receive the length, can be nullptr. + * @return a pointer to the string, or nullptr. * * @stable ICU 2.4 */ @@ -158,21 +158,21 @@ public: /** * <p>Returns the next element a UnicodeString*. If there are no - * more elements, returns NULL.</p> + * more elements, returns nullptr.</p> * * <p>The returned pointer is owned by this iterator and must not be * deleted by the caller. The pointer is valid until the next call * to next, unext, snext, reset, or the enumerator's destructor.</p> * * <p>If the iterator is out of sync with its service, status is set - * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p> + * to U_ENUM_OUT_OF_SYNC_ERROR and nullptr is returned.</p> * * Starting with ICU 2.8, the default implementation calls next() * and handles the conversion. * Either next() or snext() must be implemented differently by a subclass. * * @param status the error code. - * @return a pointer to the string, or NULL. + * @return a pointer to the string, or nullptr. * * @stable ICU 2.4 */ diff --git a/thirdparty/icu4c/common/unicode/stringtriebuilder.h b/thirdparty/icu4c/common/unicode/stringtriebuilder.h index b7a9b23d22..429d7883f1 100644 --- a/thirdparty/icu4c/common/unicode/stringtriebuilder.h +++ b/thirdparty/icu4c/common/unicode/stringtriebuilder.h @@ -152,7 +152,7 @@ protected: * equivalent to newNode. * @param newNode Input node. The builder takes ownership. * @param errorCode ICU in/out UErrorCode. - Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==NULL. + Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==nullptr. * @return newNode if it is the first of its kind, or * an equivalent node if newNode is a duplicate. * @internal @@ -164,7 +164,7 @@ protected: * Avoids creating a node if the value is a duplicate. * @param value A final value. * @param errorCode ICU in/out UErrorCode. - Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==NULL. + Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==nullptr. * @return A FinalValueNode with the given value. * @internal */ @@ -176,11 +176,11 @@ protected: * registerNode() and registerFinalValue() take ownership of their input nodes, * and only return owned nodes. * If they see a failure UErrorCode, they will delete the input node. - * If they get a NULL pointer, they will record a U_MEMORY_ALLOCATION_ERROR. - * If there is a failure, they return NULL. + * If they get a nullptr pointer, they will record a U_MEMORY_ALLOCATION_ERROR. + * If there is a failure, they return nullptr. * - * NULL Node pointers can be safely passed into other Nodes because - * they call the static Node::hashCode() which checks for a NULL pointer first. + * nullptr Node pointers can be safely passed into other Nodes because + * they call the static Node::hashCode() which checks for a nullptr pointer first. * * Therefore, as long as builder functions register a new node, * they need to check for failures only before explicitly dereferencing @@ -201,8 +201,8 @@ protected: public: Node(int32_t initialHash) : hash(initialHash), offset(0) {} inline int32_t hashCode() const { return hash; } - // Handles node==NULL. - static inline int32_t hashCode(const Node *node) { return node==NULL ? 0 : node->hashCode(); } + // Handles node==nullptr. + static inline int32_t hashCode(const Node *node) { return node==nullptr ? 0 : node->hashCode(); } // Base class operator==() compares the actual class types. virtual bool operator==(const Node &other) const; inline bool operator!=(const Node &other) const { return !operator==(other); } @@ -347,7 +347,7 @@ protected: // Adds a unit with a final value. void add(int32_t c, int32_t value) { units[length]=(char16_t)c; - equal[length]=NULL; + equal[length]=nullptr; values[length]=value; ++length; hash=(hash*37u+c)*37u+value; @@ -361,7 +361,7 @@ protected: hash=(hash*37u+c)*37u+hashCode(node); } protected: - Node *equal[kMaxBranchLinearSubNodeLength]; // NULL means "has final value". + Node *equal[kMaxBranchLinearSubNodeLength]; // nullptr means "has final value". int32_t length; int32_t values[kMaxBranchLinearSubNodeLength]; char16_t units[kMaxBranchLinearSubNodeLength]; diff --git a/thirdparty/icu4c/common/unicode/symtable.h b/thirdparty/icu4c/common/unicode/symtable.h index b64d877f97..647a3884a0 100644 --- a/thirdparty/icu4c/common/unicode/symtable.h +++ b/thirdparty/icu4c/common/unicode/symtable.h @@ -73,10 +73,10 @@ public: /** * Lookup the characters associated with this string and return it. - * Return <tt>NULL</tt> if no such name exists. The resultant + * Return <tt>nullptr</tt> if no such name exists. The resultant * string may have length zero. * @param s the symbolic name to lookup - * @return a string containing the name's value, or <tt>NULL</tt> if + * @return a string containing the name's value, or <tt>nullptr</tt> if * there is no mapping for s. * @stable ICU 2.8 */ @@ -84,10 +84,10 @@ public: /** * Lookup the UnicodeMatcher associated with the given character, and - * return it. Return <tt>NULL</tt> if not found. + * return it. Return <tt>nullptr</tt> if not found. * @param ch a 32-bit code point from 0 to 0x10FFFF inclusive. * @return the UnicodeMatcher object represented by the given - * character, or NULL if there is no mapping for ch. + * character, or nullptr if there is no mapping for ch. * @stable ICU 2.8 */ virtual const UnicodeFunctor* lookupMatcher(UChar32 ch) const = 0; diff --git a/thirdparty/icu4c/common/unicode/uchar.h b/thirdparty/icu4c/common/unicode/uchar.h index 6bb68e62a9..4f82a9fb58 100644 --- a/thirdparty/icu4c/common/unicode/uchar.h +++ b/thirdparty/icu4c/common/unicode/uchar.h @@ -3836,13 +3836,10 @@ u_getPropertyValueEnum(UProperty property, const char* alias); /** - * Determines if the specified character is permissible as the - * first character in an identifier according to Unicode - * (The Unicode Standard, Version 3.0, chapter 5.16 Identifiers). - * True for characters with general categories "L" (letters) and "Nl" (letter numbers). + * Determines if the specified character is permissible as the first character in an identifier + * according to UAX #31 Unicode Identifier and Pattern Syntax. * - * Same as java.lang.Character.isUnicodeIdentifierStart(). - * Same as UCHAR_ID_START + * Same as Unicode ID_Start (UCHAR_ID_START). * * @param c the code point to be tested * @return true if the code point may start an identifier @@ -3856,20 +3853,13 @@ U_CAPI UBool U_EXPORT2 u_isIDStart(UChar32 c); /** - * Determines if the specified character is permissible - * in an identifier according to Java. - * True for characters with general categories "L" (letters), - * "Nl" (letter numbers), "Nd" (decimal digits), - * "Mc" and "Mn" (combining marks), "Pc" (connecting punctuation), and - * u_isIDIgnorable(c). + * Determines if the specified character is permissible as a non-initial character of an identifier + * according to UAX #31 Unicode Identifier and Pattern Syntax. * - * Same as java.lang.Character.isUnicodeIdentifierPart(). - * Almost the same as Unicode's ID_Continue (UCHAR_ID_CONTINUE) - * except that Unicode recommends to ignore Cf which is less than - * u_isIDIgnorable(c). + * Same as Unicode ID_Continue (UCHAR_ID_CONTINUE). * * @param c the code point to be tested - * @return true if the code point may occur in an identifier according to Java + * @return true if the code point may occur as a non-initial character of an identifier * * @see UCHAR_ID_CONTINUE * @see u_isIDStart diff --git a/thirdparty/icu4c/common/unicode/ucharstrie.h b/thirdparty/icu4c/common/unicode/ucharstrie.h index 064244a74c..fa1b55616c 100644 --- a/thirdparty/icu4c/common/unicode/ucharstrie.h +++ b/thirdparty/icu4c/common/unicode/ucharstrie.h @@ -67,7 +67,7 @@ public: * @stable ICU 4.8 */ UCharsTrie(ConstChar16Ptr trieUChars) - : ownedArray_(NULL), uchars_(trieUChars), + : ownedArray_(nullptr), uchars_(trieUChars), pos_(uchars_), remainingMatchLength_(-1) {} /** @@ -83,7 +83,7 @@ public: * @stable ICU 4.8 */ UCharsTrie(const UCharsTrie &other) - : ownedArray_(NULL), uchars_(other.uchars_), + : ownedArray_(nullptr), uchars_(other.uchars_), pos_(other.pos_), remainingMatchLength_(other.remainingMatchLength_) {} /** @@ -141,7 +141,7 @@ public: * Constructs an empty State. * @stable ICU 4.8 */ - State() { uchars=NULL; } + State() { uchars=nullptr; } private: friend class UCharsTrie; @@ -175,7 +175,7 @@ public: * @stable ICU 4.8 */ UCharsTrie &resetToState(const State &state) { - if(uchars_==state.uchars && uchars_!=NULL) { + if(uchars_==state.uchars && uchars_!=nullptr) { pos_=state.pos; remainingMatchLength_=state.remainingMatchLength; } @@ -239,7 +239,7 @@ public: * result=next(c); * return result; * \endcode - * @param s A string. Can be NULL if length is 0. + * @param s A string. Can be nullptr if length is 0. * @param length The length of the string. Can be -1 if NUL-terminated. * @return The match/value Result. * @stable ICU 4.8 @@ -275,7 +275,7 @@ public: inline UBool hasUniqueValue(int32_t &uniqueValue) const { const char16_t *pos=pos_; // Skip the rest of a pending linear-match node. - return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue); + return pos!=nullptr && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue); } /** @@ -367,7 +367,7 @@ public: private: UBool truncateAndStop() { - pos_=NULL; + pos_=nullptr; value_=-1; // no real value for str return true; } @@ -412,7 +412,7 @@ private: UCharsTrie &operator=(const UCharsTrie &other) = delete; inline void stop() { - pos_=NULL; + pos_=nullptr; } // Reads a compact 32-bit integer. @@ -610,7 +610,7 @@ private: // Iterator variables. - // Pointer to next trie unit to read. NULL if no more matches. + // Pointer to next trie unit to read. nullptr if no more matches. const char16_t *pos_; // Remaining length of a linear-match node, minus 1. Negative if not in such a node. int32_t remainingMatchLength_; diff --git a/thirdparty/icu4c/common/unicode/uclean.h b/thirdparty/icu4c/common/unicode/uclean.h index c2d920a16e..f5b0aa088a 100644 --- a/thirdparty/icu4c/common/unicode/uclean.h +++ b/thirdparty/icu4c/common/unicode/uclean.h @@ -114,7 +114,8 @@ typedef void *U_CALLCONV UMemAllocFn(const void *context, size_t size); /** * Pointer type for a user supplied memory re-allocation function. * @param context user supplied value, obtained from u_setMemoryFunctions(). - * @param size The number of bytes to be allocated + * @param mem Pointer to the memory block to be resized. + * @param size The new size for the block. * @return Pointer to the newly allocated memory, or NULL if the allocation failed. * @stable ICU 2.8 * @system @@ -124,8 +125,7 @@ typedef void *U_CALLCONV UMemReallocFn(const void *context, void *mem, size_t si * Pointer type for a user supplied memory free function. Behavior should be * similar the standard C library free(). * @param context user supplied value, obtained from u_setMemoryFunctions(). - * @param mem Pointer to the memory block to be resized - * @param size The new size for the block + * @param mem Pointer to the memory block to be freed. * @return Pointer to the resized memory block, or NULL if the resizing failed. * @stable ICU 2.8 * @system diff --git a/thirdparty/icu4c/common/unicode/uconfig.h b/thirdparty/icu4c/common/unicode/uconfig.h index bbc232d1ed..3818ca02ef 100644 --- a/thirdparty/icu4c/common/unicode/uconfig.h +++ b/thirdparty/icu4c/common/unicode/uconfig.h @@ -323,6 +323,16 @@ # define UCONFIG_NO_NORMALIZATION 0 #endif +/** + * \def UCONFIG_USE_ML_PHRASE_BREAKING + * This switch turns on BudouX ML phrase-based line breaking, rather than using the dictionary. + * + * @internal + */ +#ifndef UCONFIG_USE_ML_PHRASE_BREAKING +# define UCONFIG_USE_ML_PHRASE_BREAKING 0 +#endif + #if UCONFIG_NO_NORMALIZATION /* common library */ /* ICU 50 CJK dictionary BreakIterator uses normalization */ diff --git a/thirdparty/icu4c/common/unicode/udata.h b/thirdparty/icu4c/common/unicode/udata.h index c5b1adc359..4cda255010 100644 --- a/thirdparty/icu4c/common/unicode/udata.h +++ b/thirdparty/icu4c/common/unicode/udata.h @@ -306,7 +306,7 @@ udata_getInfo(UDataMemory *pData, UDataInfo *pInfo); * area in memory. * * ICU data must be at least 8-aligned, and should be 16-aligned. - * See https://unicode-org.github.io/icu/userguide/icudata + * See https://unicode-org.github.io/icu/userguide/icu_data * * The format of this data is that of the icu common data file, as is * generated by the pkgdata tool with mode=common or mode=dll. @@ -353,7 +353,7 @@ udata_setCommonData(const void *data, UErrorCode *err); * pointer. * * ICU data must be at least 8-aligned, and should be 16-aligned. - * See https://unicode-org.github.io/icu/userguide/icudata + * See https://unicode-org.github.io/icu/userguide/icu_data * * The format of this data is that of the icu common data file, like 'icudt26l.dat' * or the corresponding shared library (DLL) file. diff --git a/thirdparty/icu4c/common/unicode/umachine.h b/thirdparty/icu4c/common/unicode/umachine.h index 6640606272..545abef595 100644 --- a/thirdparty/icu4c/common/unicode/umachine.h +++ b/thirdparty/icu4c/common/unicode/umachine.h @@ -119,28 +119,6 @@ /** Obsolete/same as U_CAPI; was used to declare a function as an internal ICU C API */ #define U_INTERNAL U_CAPI -/** - * \def U_OVERRIDE - * Defined to the C++11 "override" keyword if available. - * Denotes a class or member which is an override of the base class. - * May result in an error if it applied to something not an override. - * @internal - */ -#ifndef U_OVERRIDE -#define U_OVERRIDE override -#endif - -/** - * \def U_FINAL - * Defined to the C++11 "final" keyword if available. - * Denotes a class or member which may not be overridden in subclasses. - * May result in an error if subclasses attempt to override. - * @internal - */ -#if !defined(U_FINAL) || defined(U_IN_DOXYGEN) -#define U_FINAL final -#endif - // Before ICU 65, function-like, multi-statement ICU macros were just defined as // series of statements wrapped in { } blocks and the caller could choose to // either treat them as if they were actual functions and end the invocation @@ -348,7 +326,7 @@ typedef int8_t UBool; /* UChar and UChar32 definitions -------------------------------------------- */ -/** Number of bytes in a UChar. @stable ICU 2.0 */ +/** Number of bytes in a UChar (always 2). @stable ICU 2.0 */ #define U_SIZEOF_UCHAR 2 /** @@ -356,11 +334,7 @@ typedef int8_t UBool; * If 1, then char16_t is a typedef and not a real type (yet) * @internal */ -#if (U_PLATFORM == U_PF_AIX) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11) -// for AIX, uchar.h needs to be included -# include <uchar.h> -# define U_CHAR16_IS_TYPEDEF 1 -#elif defined(_MSC_VER) && (_MSC_VER < 1900) +#if defined(_MSC_VER) && (_MSC_VER < 1900) // Versions of Visual Studio/MSVC below 2015 do not support char16_t as a real type, // and instead use a typedef. https://msdn.microsoft.com/library/bb531344.aspx # define U_CHAR16_IS_TYPEDEF 1 @@ -408,10 +382,10 @@ typedef int8_t UBool; typedef char16_t UChar; #elif defined(UCHAR_TYPE) typedef UCHAR_TYPE UChar; -#elif (U_CPLUSPLUS_VERSION >= 11) - typedef char16_t UChar; +#elif U_CPLUSPLUS_VERSION != 0 + typedef char16_t UChar; // C++ #else - typedef uint16_t UChar; + typedef uint16_t UChar; // C #endif /** diff --git a/thirdparty/icu4c/common/unicode/uniset.h b/thirdparty/icu4c/common/unicode/uniset.h index 33e35c4def..84774d9f36 100644 --- a/thirdparty/icu4c/common/unicode/uniset.h +++ b/thirdparty/icu4c/common/unicode/uniset.h @@ -282,7 +282,7 @@ class RuleCharacterIterator; * @author Alan Liu * @stable ICU 2.0 */ -class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter { +class U_COMMON_API UnicodeSet final : public UnicodeFilter { private: /** * Enough for sets with few ranges. @@ -297,8 +297,8 @@ private: int32_t len = 1; // length of list used; 1 <= len <= capacity uint8_t fFlags = 0; // Bit flag (see constants above) - BMPSet *bmpSet = nullptr; // The set is frozen iff either bmpSet or stringSpan is not NULL. - UChar32* buffer = nullptr; // internal buffer, may be NULL + BMPSet *bmpSet = nullptr; // The set is frozen iff either bmpSet or stringSpan is not nullptr. + UChar32* buffer = nullptr; // internal buffer, may be nullptr int32_t bufferCapacity = 0; // capacity of buffer /** @@ -430,9 +430,11 @@ public: * description for the syntax of the pattern language. * @param pattern a string specifying what characters are in the set * @param options bitmask for options to apply to the pattern. - * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * Valid options are USET_IGNORE_SPACE and + * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. + * These case options are mutually exclusive. * @param symbols a symbol table mapping variable names to values - * and stand-in characters to UnicodeSets; may be NULL + * and stand-in characters to UnicodeSets; may be nullptr * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern * contains a syntax error. * @internal @@ -450,9 +452,11 @@ public: * @param pos on input, the position in pattern at which to start parsing. * On output, the position after the last character parsed. * @param options bitmask for options to apply to the pattern. - * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * Valid options are USET_IGNORE_SPACE and + * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. + * These case options are mutually exclusive. * @param symbols a symbol table mapping variable names to values - * and stand-in characters to UnicodeSets; may be NULL + * and stand-in characters to UnicodeSets; may be nullptr * @param status input-output error code * @stable ICU 2.8 */ @@ -645,9 +649,11 @@ public: * A frozen set will not be modified. * @param pattern a string specifying what characters are in the set * @param options bitmask for options to apply to the pattern. - * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * Valid options are USET_IGNORE_SPACE and + * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. + * These case options are mutually exclusive. * @param symbols a symbol table mapping variable names to - * values and stand-ins to UnicodeSets; may be NULL + * values and stand-ins to UnicodeSets; may be nullptr * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern * contains a syntax error. *<em> Empties the set passed before applying the pattern.</em> @@ -683,9 +689,11 @@ public: * pattern.length() if the closing ']' is the last character of * the pattern string. * @param options bitmask for options to apply to the pattern. - * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * Valid options are USET_IGNORE_SPACE and + * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. + * These case options are mutually exclusive. * @param symbols a symbol table mapping variable names to - * values and stand-ins to UnicodeSets; may be NULL + * values and stand-ins to UnicodeSets; may be nullptr * @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern * contains a syntax error. * @return a reference to this @@ -1390,7 +1398,7 @@ public: /** * Close this set over the given attribute. For the attribute - * USET_CASE, the result is to modify this set so that: + * USET_CASE_INSENSITIVE, the result is to modify this set so that: * * 1. For each character or string 'a' in this set, all strings or * characters 'b' such that foldCase(a) == foldCase(b) are added @@ -1408,8 +1416,10 @@ public: * A frozen set will not be modified. * * @param attribute bitmask for attributes to close over. - * Currently only the USET_CASE bit is supported. Any undefined bits - * are ignored. + * Valid options: + * At most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. + * These case options are mutually exclusive. + * Unrelated options bits are ignored. * @return a reference to this set. * @stable ICU 4.2 */ @@ -1488,7 +1498,7 @@ public: * bits followed by least significant 16 bits. * * @param dest pointer to buffer of destCapacity 16-bit integers. - * May be NULL only if destCapacity is zero. + * May be nullptr only if destCapacity is zero. * @param destCapacity size of dest, or zero. Must not be negative. * @param ec error code. Will be set to U_INDEX_OUTOFBOUNDS_ERROR * if n+2*m > 0x7FFF. Will be set to U_BUFFER_OVERFLOW_ERROR if @@ -1579,6 +1589,9 @@ private: int32_t depth, UErrorCode& ec); + void closeOverCaseInsensitive(bool simple); + void closeOverAddCaseMappings(); + //---------------------------------------------------------------- // Implementation: Utility methods //---------------------------------------------------------------- @@ -1718,7 +1731,7 @@ inline bool UnicodeSet::operator!=(const UnicodeSet& o) const { } inline UBool UnicodeSet::isFrozen() const { - return (UBool)(bmpSet!=NULL || stringSpan!=NULL); + return (UBool)(bmpSet!=nullptr || stringSpan!=nullptr); } inline UBool UnicodeSet::containsSome(UChar32 start, UChar32 end) const { diff --git a/thirdparty/icu4c/common/unicode/unistr.h b/thirdparty/icu4c/common/unicode/unistr.h index b3c9948107..4074e8d07b 100644 --- a/thirdparty/icu4c/common/unicode/unistr.h +++ b/thirdparty/icu4c/common/unicode/unistr.h @@ -253,7 +253,7 @@ class UnicodeStringAppendable; // unicode/appendable.h * target object, e.g., calling str.append(str), an extra copy may take place * to ensure safety. * - If primitive string pointer values (e.g., const char16_t * or char *) - * for input strings are NULL, then those input string parameters are treated + * for input strings are nullptr, then those input string parameters are treated * as if they pointed to an empty string. * However, this is *not* the case for char * parameters for charset names * or other IDs. @@ -1542,7 +1542,7 @@ public: * * @param start offset of first character which will be copied * @param startLength the number of characters to extract - * @param target the target buffer for extraction, can be NULL + * @param target the target buffer for extraction, can be nullptr * if targetLength is 0 * @param targetCapacity the length of the target buffer * @param inv Signature-distinguishing parameter, use US_INV. @@ -1571,7 +1571,7 @@ public: * @param startLength the number of characters to extract * @param target the target buffer for extraction * @param targetLength the length of the target buffer - * If `target` is NULL, then the number of bytes required for + * If `target` is nullptr, then the number of bytes required for * `target` is returned. * @return the output string length, not including the terminating NUL * @stable ICU 2.0 @@ -1604,7 +1604,7 @@ public: * If `codepage` is an empty string (`""`), * then a simple conversion is performed on the codepage-invariant * subset ("invariant characters") of the platform encoding. See utypes.h. - * If `target` is NULL, then the number of bytes required for + * If `target` is nullptr, then the number of bytes required for * `target` is returned. It is assumed that the target is big enough * to fit all of the characters. * @return the output string length, not including the terminating NUL @@ -1639,7 +1639,7 @@ public: * If `codepage` is an empty string (`""`), * then a simple conversion is performed on the codepage-invariant * subset ("invariant characters") of the platform encoding. See utypes.h. - * If `target` is NULL, then the number of bytes required for + * If `target` is nullptr, then the number of bytes required for * `target` is returned. * @return the output string length, not including the terminating NUL * @stable ICU 2.0 @@ -1657,10 +1657,10 @@ public: * This function avoids the overhead of opening and closing a converter if * multiple strings are extracted. * - * @param dest destination string buffer, can be NULL if destCapacity==0 + * @param dest destination string buffer, can be nullptr if destCapacity==0 * @param destCapacity the number of chars available at dest * @param cnv the converter object to be used (ucnv_resetFromUnicode() will be called), - * or NULL for the default converter + * or nullptr for the default converter * @param errorCode normal ICU error code * @return the length of the output string, not counting the terminating NUL; * if the length is greater than destCapacity, then the string will not fit @@ -1737,7 +1737,7 @@ public: * Unpaired surrogates are replaced with U+FFFD. * Calls u_strToUTF32WithSub(). * - * @param utf32 destination string buffer, can be NULL if capacity==0 + * @param utf32 destination string buffer, can be nullptr if capacity==0 * @param capacity the number of UChar32s available at utf32 * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns @@ -1835,7 +1835,7 @@ public: * A bogus string has no value. It is different from an empty string, * although in both cases isEmpty() returns true and length() returns 0. * setToBogus() and isBogus() can be used to indicate that no string value is available. - * For a bogus string, getBuffer() and getTerminatedBuffer() return NULL, and + * For a bogus string, getBuffer() and getTerminatedBuffer() return nullptr, and * length() returns 0. * * @return true if the string is bogus/invalid, false otherwise @@ -1906,14 +1906,14 @@ public: * @return *this * @stable ICU 56 */ - UnicodeString &operator=(UnicodeString &&src) U_NOEXCEPT; + UnicodeString &operator=(UnicodeString &&src) noexcept; /** * Swap strings. * @param other other string * @stable ICU 56 */ - void swap(UnicodeString &other) U_NOEXCEPT; + void swap(UnicodeString &other) noexcept; /** * Non-member UnicodeString swap function. @@ -1922,7 +1922,7 @@ public: * @stable ICU 56 */ friend inline void U_EXPORT2 - swap(UnicodeString &s1, UnicodeString &s2) U_NOEXCEPT { + swap(UnicodeString &s1, UnicodeString &s2) noexcept { s1.swap(s2); } @@ -2072,7 +2072,7 @@ public: * * A bogus string has no value. It is different from an empty string. * It can be used to indicate that no string value is available. - * getBuffer() and getTerminatedBuffer() return NULL, and + * getBuffer() and getTerminatedBuffer() return nullptr, and * length() returns 0. * * This utility function is used throughout the UnicodeString @@ -2978,7 +2978,7 @@ public: * `-DUNISTR_FROM_STRING_EXPLICIT=explicit` * on the compiler command line or similar. * @param text The characters to place in the UnicodeString. `text` - * must be NULL (U+0000) terminated. + * must be NUL (U+0000) terminated. * @stable ICU 2.0 */ UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char16_t *text); @@ -3245,7 +3245,7 @@ public: * @param src input codepage string * @param srcLength length of the input string, can be -1 for NUL-terminated strings * @param cnv converter object (ucnv_resetToUnicode() will be called), - * can be NULL for the default converter + * can be nullptr for the default converter * @param errorCode normal ICU error code * @stable ICU 2.0 */ @@ -3306,7 +3306,7 @@ public: * @param src source string * @stable ICU 56 */ - UnicodeString(UnicodeString &&src) U_NOEXCEPT; + UnicodeString(UnicodeString &&src) noexcept; /** * 'Substring' constructor from tail of source string. @@ -3329,7 +3329,7 @@ public: * Clone this object, an instance of a subclass of Replaceable. * Clones can be used concurrently in multiple threads. * If a subclass does not implement clone(), or if an error occurs, - * then NULL is returned. + * then nullptr is returned. * The caller must delete the clone. * * @return a clone of this object @@ -3365,7 +3365,7 @@ public: * Illegal input is replaced with U+FFFD. Otherwise, errors result in a bogus string. * Calls u_strFromUTF32WithSub(). * - * @param utf32 UTF-32 input string. Must not be NULL. + * @param utf32 UTF-32 input string. Must not be nullptr. * @param length Length of the input string, or -1 if NUL-terminated. * @return A UnicodeString with equivalent UTF-16 contents. * @see toUTF32 @@ -3489,6 +3489,19 @@ private: */ UBool doEquals(const UnicodeString &text, int32_t len) const; + inline UBool + doEqualsSubstring(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; + + UBool doEqualsSubstring(int32_t start, + int32_t length, + const char16_t *srcChars, + int32_t srcStart, + int32_t srcLength) const; + inline int8_t doCompare(int32_t start, int32_t length, @@ -3618,7 +3631,7 @@ private: UnicodeString ©From(const UnicodeString &src, UBool fastCopy=false); // Copies just the fields without memory management. - void copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) U_NOEXCEPT; + void copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) noexcept; // Pin start and limit to acceptable values. inline void pinIndex(int32_t& start) const; @@ -3706,7 +3719,7 @@ private: kEmptyHashCode=1, // hash code for empty string // bit flag values for fLengthAndFlags - kIsBogus=1, // this string is bogus, i.e., not valid or NULL + kIsBogus=1, // this string is bogus, i.e., not valid or nullptr kUsingStackBuffer=2,// using fUnion.fStackFields instead of fUnion.fFields kRefCounted=4, // there is a refCount field before the characters in fArray kBufferIsReadonly=8,// do not write to this buffer @@ -3946,6 +3959,21 @@ UnicodeString::doCompare(int32_t start, } } +inline UBool +UnicodeString::doEqualsSubstring(int32_t start, + int32_t thisLength, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ + if(srcText.isBogus()) { + return isBogus(); + } else { + srcText.pinIndices(srcStart, srcLength); + return !isBogus() && doEqualsSubstring(start, thisLength, srcText.getArrayStart(), srcStart, srcLength); + } +} + inline bool UnicodeString::operator== (const UnicodeString& text) const { @@ -4326,20 +4354,20 @@ UnicodeString::lastIndexOf(UChar32 c, inline UBool UnicodeString::startsWith(const UnicodeString& text) const -{ return compare(0, text.length(), text, 0, text.length()) == 0; } +{ return doEqualsSubstring(0, text.length(), text, 0, text.length()); } inline UBool UnicodeString::startsWith(const UnicodeString& srcText, int32_t srcStart, int32_t srcLength) const -{ return doCompare(0, srcLength, srcText, srcStart, srcLength) == 0; } +{ return doEqualsSubstring(0, srcLength, srcText, srcStart, srcLength); } inline UBool UnicodeString::startsWith(ConstChar16Ptr srcChars, int32_t srcLength) const { if(srcLength < 0) { srcLength = u_strlen(toUCharPtr(srcChars)); } - return doCompare(0, srcLength, srcChars, 0, srcLength) == 0; + return doEqualsSubstring(0, srcLength, srcChars, 0, srcLength); } inline UBool @@ -4347,21 +4375,21 @@ UnicodeString::startsWith(const char16_t *srcChars, int32_t srcStart, int32_t sr if(srcLength < 0) { srcLength = u_strlen(toUCharPtr(srcChars)); } - return doCompare(0, srcLength, srcChars, srcStart, srcLength) == 0; + return doEqualsSubstring(0, srcLength, srcChars, srcStart, srcLength); } inline UBool UnicodeString::endsWith(const UnicodeString& text) const -{ return doCompare(length() - text.length(), text.length(), - text, 0, text.length()) == 0; } +{ return doEqualsSubstring(length() - text.length(), text.length(), + text, 0, text.length()); } inline UBool UnicodeString::endsWith(const UnicodeString& srcText, int32_t srcStart, int32_t srcLength) const { srcText.pinIndices(srcStart, srcLength); - return doCompare(length() - srcLength, srcLength, - srcText, srcStart, srcLength) == 0; + return doEqualsSubstring(length() - srcLength, srcLength, + srcText, srcStart, srcLength); } inline UBool @@ -4370,8 +4398,7 @@ UnicodeString::endsWith(ConstChar16Ptr srcChars, if(srcLength < 0) { srcLength = u_strlen(toUCharPtr(srcChars)); } - return doCompare(length() - srcLength, srcLength, - srcChars, 0, srcLength) == 0; + return doEqualsSubstring(length() - srcLength, srcLength, srcChars, 0, srcLength); } inline UBool @@ -4381,8 +4408,8 @@ UnicodeString::endsWith(const char16_t *srcChars, if(srcLength < 0) { srcLength = u_strlen(toUCharPtr(srcChars + srcStart)); } - return doCompare(length() - srcLength, srcLength, - srcChars, srcStart, srcLength) == 0; + return doEqualsSubstring(length() - srcLength, srcLength, + srcChars, srcStart, srcLength); } //======================================== @@ -4712,18 +4739,18 @@ UnicodeString::remove(int32_t start, // remove(guaranteed everything) of a bogus string makes the string empty and non-bogus return remove(); } - return doReplace(start, _length, NULL, 0, 0); + return doReplace(start, _length, nullptr, 0, 0); } inline UnicodeString& UnicodeString::removeBetween(int32_t start, int32_t limit) -{ return doReplace(start, limit - start, NULL, 0, 0); } +{ return doReplace(start, limit - start, nullptr, 0, 0); } inline UnicodeString & UnicodeString::retainBetween(int32_t start, int32_t limit) { truncate(limit); - return doReplace(0, start, NULL, 0, 0); + return doReplace(0, start, nullptr, 0, 0); } inline UBool diff --git a/thirdparty/icu4c/common/unicode/uobject.h b/thirdparty/icu4c/common/unicode/uobject.h index 25a8330f9a..f53ec1d111 100644 --- a/thirdparty/icu4c/common/unicode/uobject.h +++ b/thirdparty/icu4c/common/unicode/uobject.h @@ -32,21 +32,21 @@ /** * \def U_NO_THROW - * Since ICU 64, use U_NOEXCEPT instead. + * Since ICU 64, use noexcept instead. * * Previously, define this to define the throw() specification so * certain functions do not throw any exceptions * * UMemory operator new methods should have the throw() specification - * appended to them, so that the compiler adds the additional NULL check - * before calling constructors. Without, if <code>operator new</code> returns NULL the + * appended to them, so that the compiler adds the additional nullptr check + * before calling constructors. Without, if <code>operator new</code> returns nullptr the * constructor is still called, and if the constructor references member * data, (which it typically does), the result is a segmentation violation. * - * @stable ICU 4.2. Since ICU 64, Use U_NOEXCEPT instead. See ICU-20422. + * @stable ICU 4.2. Since ICU 64, Use noexcept instead. See ICU-20422. */ #ifndef U_NO_THROW -#define U_NO_THROW U_NOEXCEPT +#define U_NO_THROW noexcept #endif /*===========================================================================*/ @@ -131,14 +131,14 @@ public: * for ICU4C C++ classes * @stable ICU 2.4 */ - static void * U_EXPORT2 operator new(size_t size) U_NOEXCEPT; + static void * U_EXPORT2 operator new(size_t size) noexcept; /** * Override for ICU4C C++ memory management. * See new(). * @stable ICU 2.4 */ - static void * U_EXPORT2 operator new[](size_t size) U_NOEXCEPT; + static void * U_EXPORT2 operator new[](size_t size) noexcept; /** * Override for ICU4C C++ memory management. @@ -148,14 +148,14 @@ public: * for ICU4C C++ classes * @stable ICU 2.4 */ - static void U_EXPORT2 operator delete(void *p) U_NOEXCEPT; + static void U_EXPORT2 operator delete(void *p) noexcept; /** * Override for ICU4C C++ memory management. * See delete(). * @stable ICU 2.4 */ - static void U_EXPORT2 operator delete[](void *p) U_NOEXCEPT; + static void U_EXPORT2 operator delete[](void *p) noexcept; #if U_HAVE_PLACEMENT_NEW /** @@ -163,14 +163,14 @@ public: * See new(). * @stable ICU 2.6 */ - static inline void * U_EXPORT2 operator new(size_t, void *ptr) U_NOEXCEPT { return ptr; } + static inline void * U_EXPORT2 operator new(size_t, void *ptr) noexcept { return ptr; } /** * Override for ICU4C C++ memory management for STL. * See delete(). * @stable ICU 2.6 */ - static inline void U_EXPORT2 operator delete(void *, void *) U_NOEXCEPT {} + static inline void U_EXPORT2 operator delete(void *, void *) noexcept {} #endif /* U_HAVE_PLACEMENT_NEW */ #if U_HAVE_DEBUG_LOCATION_NEW /** @@ -180,7 +180,7 @@ public: * @param file The file where the allocation was requested * @param line The line where the allocation was requested */ - static void * U_EXPORT2 operator new(size_t size, const char* file, int line) U_NOEXCEPT; + static void * U_EXPORT2 operator new(size_t size, const char* file, int line) noexcept; /** * This method provides a matching delete for the MFC debug new * @@ -188,7 +188,7 @@ public: * @param file The file where the allocation was requested * @param line The line where the allocation was requested */ - static void U_EXPORT2 operator delete(void* p, const char* file, int line) U_NOEXCEPT; + static void U_EXPORT2 operator delete(void* p, const char* file, int line) noexcept; #endif /* U_HAVE_DEBUG_LOCATION_NEW */ #endif /* U_OVERRIDE_CXX_ALLOCATION */ diff --git a/thirdparty/icu4c/common/unicode/urename.h b/thirdparty/icu4c/common/unicode/urename.h index d3e23b8fa7..b35df45380 100644 --- a/thirdparty/icu4c/common/unicode/urename.h +++ b/thirdparty/icu4c/common/unicode/urename.h @@ -564,6 +564,7 @@ #define ucal_setTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_setTimeZone) #define ucase_addCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addCaseClosure) #define ucase_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(ucase_addPropertyStarts) +#define ucase_addSimpleCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addSimpleCaseClosure) #define ucase_addStringCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addStringCaseClosure) #define ucase_fold U_ICU_ENTRY_POINT_RENAME(ucase_fold) #define ucase_getCaseLocale U_ICU_ENTRY_POINT_RENAME(ucase_getCaseLocale) @@ -1748,6 +1749,20 @@ #define uset_spanBackUTF8 U_ICU_ENTRY_POINT_RENAME(uset_spanBackUTF8) #define uset_spanUTF8 U_ICU_ENTRY_POINT_RENAME(uset_spanUTF8) #define uset_toPattern U_ICU_ENTRY_POINT_RENAME(uset_toPattern) +#define usnum_close U_ICU_ENTRY_POINT_RENAME(usnum_close) +#define usnum_multiplyByPowerOfTen U_ICU_ENTRY_POINT_RENAME(usnum_multiplyByPowerOfTen) +#define usnum_openForInt64 U_ICU_ENTRY_POINT_RENAME(usnum_openForInt64) +#define usnum_roundTo U_ICU_ENTRY_POINT_RENAME(usnum_roundTo) +#define usnum_setMinimumFractionDigits U_ICU_ENTRY_POINT_RENAME(usnum_setMinimumFractionDigits) +#define usnum_setMinimumIntegerDigits U_ICU_ENTRY_POINT_RENAME(usnum_setMinimumIntegerDigits) +#define usnum_setSign U_ICU_ENTRY_POINT_RENAME(usnum_setSign) +#define usnum_setToInt64 U_ICU_ENTRY_POINT_RENAME(usnum_setToInt64) +#define usnum_truncateStart U_ICU_ENTRY_POINT_RENAME(usnum_truncateStart) +#define usnumf_close U_ICU_ENTRY_POINT_RENAME(usnumf_close) +#define usnumf_format U_ICU_ENTRY_POINT_RENAME(usnumf_format) +#define usnumf_formatInt64 U_ICU_ENTRY_POINT_RENAME(usnumf_formatInt64) +#define usnumf_openForLocale U_ICU_ENTRY_POINT_RENAME(usnumf_openForLocale) +#define usnumf_openForLocaleAndGroupingStrategy U_ICU_ENTRY_POINT_RENAME(usnumf_openForLocaleAndGroupingStrategy) #define uspoof_areConfusable U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusable) #define uspoof_areConfusableUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUTF8) #define uspoof_areConfusableUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUnicodeString) diff --git a/thirdparty/icu4c/common/unicode/ures.h b/thirdparty/icu4c/common/unicode/ures.h index a6c43f9537..cc25b6e49c 100644 --- a/thirdparty/icu4c/common/unicode/ures.h +++ b/thirdparty/icu4c/common/unicode/ures.h @@ -812,7 +812,7 @@ inline UnicodeString ures_getUnicodeString(const UResourceBundle *resB, UErrorCode* status) { UnicodeString result; int32_t len = 0; - const UChar *r = ures_getString(resB, &len, status); + const char16_t *r = ures_getString(resB, &len, status); if(U_SUCCESS(*status)) { result.setTo(true, r, len); } else { @@ -837,7 +837,7 @@ inline UnicodeString ures_getNextUnicodeString(UResourceBundle *resB, const char ** key, UErrorCode* status) { UnicodeString result; int32_t len = 0; - const UChar* r = ures_getNextString(resB, &len, key, status); + const char16_t* r = ures_getNextString(resB, &len, key, status); if(U_SUCCESS(*status)) { result.setTo(true, r, len); } else { @@ -859,7 +859,7 @@ inline UnicodeString ures_getUnicodeStringByIndex(const UResourceBundle *resB, int32_t indexS, UErrorCode* status) { UnicodeString result; int32_t len = 0; - const UChar* r = ures_getStringByIndex(resB, indexS, &len, status); + const char16_t* r = ures_getStringByIndex(resB, indexS, &len, status); if(U_SUCCESS(*status)) { result.setTo(true, r, len); } else { @@ -882,7 +882,7 @@ inline UnicodeString ures_getUnicodeStringByKey(const UResourceBundle *resB, const char* key, UErrorCode* status) { UnicodeString result; int32_t len = 0; - const UChar* r = ures_getStringByKey(resB, key, &len, status); + const char16_t* r = ures_getStringByKey(resB, key, &len, status); if(U_SUCCESS(*status)) { result.setTo(true, r, len); } else { diff --git a/thirdparty/icu4c/common/unicode/uset.h b/thirdparty/icu4c/common/unicode/uset.h index 5dd890e148..ee4e0036d2 100644 --- a/thirdparty/icu4c/common/unicode/uset.h +++ b/thirdparty/icu4c/common/unicode/uset.h @@ -53,6 +53,12 @@ typedef struct USet USet; /** * Bitmask values to be passed to uset_openPatternOptions() or * uset_applyPattern() taking an option parameter. + * + * Use at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. + * These case options are mutually exclusive. + * + * Undefined options bits are ignored, and reserved for future use. + * * @stable ICU 2.4 */ enum { @@ -60,13 +66,13 @@ enum { * Ignore white space within patterns unless quoted or escaped. * @stable ICU 2.4 */ - USET_IGNORE_SPACE = 1, + USET_IGNORE_SPACE = 1, /** * Enable case insensitive matching. E.g., "[ab]" with this flag * will match 'a', 'A', 'b', and 'B'. "[^ab]" with this flag will * match all except 'a', 'A', 'b', and 'B'. This performs a full - * closure over case mappings, e.g. U+017F for s. + * closure over case mappings, e.g. 'ſ' (U+017F long s) for 's'. * * The resulting set is a superset of the input for the code points but * not for the strings. @@ -88,17 +94,36 @@ enum { * * @stable ICU 2.4 */ - USET_CASE_INSENSITIVE = 2, + USET_CASE_INSENSITIVE = 2, /** - * Enable case insensitive matching. E.g., "[ab]" with this flag - * will match 'a', 'A', 'b', and 'B'. "[^ab]" with this flag will - * match all except 'a', 'A', 'b', and 'B'. This adds the lower-, - * title-, and uppercase mappings as well as the case folding + * Adds all case mappings for each element in the set. + * This adds the full lower-, title-, and uppercase mappings as well as the full case folding * of each existing element in the set. + * + * Unlike the “case insensitive” options, this does not perform a closure. + * For example, it does not add 'ſ' (U+017F long s) for 's', + * 'K' (U+212A Kelvin sign) for 'k', or replace set strings by their case-folded versions. + * * @stable ICU 3.2 */ - USET_ADD_CASE_MAPPINGS = 4 + USET_ADD_CASE_MAPPINGS = 4, + +#ifndef U_HIDE_DRAFT_API + /** + * Enable case insensitive matching. + * Same as USET_CASE_INSENSITIVE but using only Simple_Case_Folding (scf) mappings, + * which map each code point to one code point, + * not full Case_Folding (cf) mappings, which map some code points to multiple code points. + * + * This is designed for case-insensitive matches, for example in certain + * regular expression implementations where only Simple_Case_Folding mappings are used, + * such as in ECMAScript (JavaScript) regular expressions. + * + * @draft ICU 73 + */ + USET_SIMPLE_CASE_INSENSITIVE = 6 +#endif // U_HIDE_DRAFT_API }; /** @@ -299,7 +324,9 @@ uset_openPattern(const UChar* pattern, int32_t patternLength, * @param patternLength the length of the pattern, or -1 if null * terminated * @param options bitmask for options to apply to the pattern. - * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * Valid options are USET_IGNORE_SPACE and + * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. + * These case options are mutually exclusive. * @param ec the error code * @stable ICU 2.4 */ @@ -414,7 +441,10 @@ uset_set(USet* set, * The character at pattern[0] must be a '['. * @param patternLength The length of the UChar string. -1 if NUL terminated. * @param options A bitmask for options to apply to the pattern. - * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE. + * Valid options are USET_IGNORE_SPACE and + * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, + * USET_SIMPLE_CASE_INSENSITIVE. + * These case options are mutually exclusive. * @param status Returns an error if the pattern cannot be parsed. * @return Upon successful parse, the value is either * the index of the character after the closing ']' @@ -804,7 +834,7 @@ uset_clear(USet* set); /** * Close this set over the given attribute. For the attribute - * USET_CASE, the result is to modify this set so that: + * USET_CASE_INSENSITIVE, the result is to modify this set so that: * * 1. For each character or string 'a' in this set, all strings or * characters 'b' such that foldCase(a) == foldCase(b) are added @@ -824,8 +854,10 @@ uset_clear(USet* set); * @param set the set * * @param attributes bitmask for attributes to close over. - * Currently only the USET_CASE bit is supported. Any undefined bits - * are ignored. + * Valid options: + * At most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. + * These case options are mutually exclusive. + * Unrelated options bits are ignored. * @stable ICU 4.2 */ U_CAPI void U_EXPORT2 diff --git a/thirdparty/icu4c/common/unicode/usetiter.h b/thirdparty/icu4c/common/unicode/usetiter.h index 34992d94b7..3168d3b0f6 100644 --- a/thirdparty/icu4c/common/unicode/usetiter.h +++ b/thirdparty/icu4c/common/unicode/usetiter.h @@ -64,7 +64,7 @@ class UnicodeString; * @author M. Davis * @stable ICU 2.4 */ -class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject { +class U_COMMON_API UnicodeSetIterator final : public UObject { /** * Value of <tt>codepoint</tt> if the iterator points to a string. * If <tt>codepoint == IS_STRING</tt>, then examine diff --git a/thirdparty/icu4c/common/unicode/ustring.h b/thirdparty/icu4c/common/unicode/ustring.h index 5452fbe09a..03c697c722 100644 --- a/thirdparty/icu4c/common/unicode/ustring.h +++ b/thirdparty/icu4c/common/unicode/ustring.h @@ -931,14 +931,10 @@ u_memrchr32(const UChar *s, UChar32 c, int32_t count); # define U_STRING_DECL(var, cs, length) static const UChar *var=(const UChar *)U_DECLARE_UTF16(cs) /**@stable ICU 2.0 */ # define U_STRING_INIT(var, cs, length) -#elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16))) +#elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || defined(U_WCHAR_IS_UTF16)) # define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=L ## cs /**@stable ICU 2.0 */ # define U_STRING_INIT(var, cs, length) -#elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY -# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=cs - /**@stable ICU 2.0 */ -# define U_STRING_INIT(var, cs, length) #else # define U_STRING_DECL(var, cs, length) static UChar var[(length)+1] /**@stable ICU 2.0 */ diff --git a/thirdparty/icu4c/common/unicode/utext.h b/thirdparty/icu4c/common/unicode/utext.h index c6d1e53a8c..423b281631 100644 --- a/thirdparty/icu4c/common/unicode/utext.h +++ b/thirdparty/icu4c/common/unicode/utext.h @@ -230,8 +230,8 @@ utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status); /** * Open a writable UText for a non-const UnicodeString. * - * @param ut Pointer to a UText struct. If NULL, a new UText will be created. - * If non-NULL, must refer to an initialized UText struct, which will then + * @param ut Pointer to a UText struct. If nullptr, a new UText will be created. + * If non-nullptr, must refer to an initialized UText struct, which will then * be reset to reference the specified input string. * @param s A UnicodeString. * @param status Errors are returned here. @@ -246,8 +246,8 @@ utext_openUnicodeString(UText *ut, icu::UnicodeString *s, UErrorCode *status); /** * Open a UText for a const UnicodeString. The resulting UText will not be writable. * - * @param ut Pointer to a UText struct. If NULL, a new UText will be created. - * If non-NULL, must refer to an initialized UText struct, which will then + * @param ut Pointer to a UText struct. If nullptr, a new UText will be created. + * If non-nullptr, must refer to an initialized UText struct, which will then * be reset to reference the specified input string. * @param s A const UnicodeString to be wrapped. * @param status Errors are returned here. @@ -261,8 +261,8 @@ utext_openConstUnicodeString(UText *ut, const icu::UnicodeString *s, UErrorCode /** * Open a writable UText implementation for an ICU Replaceable object. - * @param ut Pointer to a UText struct. If NULL, a new UText will be created. - * If non-NULL, must refer to an already existing UText, which will then + * @param ut Pointer to a UText struct. If nullptr, a new UText will be created. + * If non-nullptr, must refer to an already existing UText, which will then * be reset to reference the specified replaceable text. * @param rep A Replaceable text object. * @param status Errors are returned here. @@ -276,8 +276,8 @@ utext_openReplaceable(UText *ut, icu::Replaceable *rep, UErrorCode *status); /** * Open a UText implementation over an ICU CharacterIterator. - * @param ut Pointer to a UText struct. If NULL, a new UText will be created. - * If non-NULL, must refer to an already existing UText, which will then + * @param ut Pointer to a UText struct. If nullptr, a new UText will be created. + * If non-nullptr, must refer to an already existing UText, which will then * be reset to reference the specified replaceable text. * @param ci A Character Iterator. * @param status Errors are returned here. diff --git a/thirdparty/icu4c/common/unicode/uvernum.h b/thirdparty/icu4c/common/unicode/uvernum.h index a93f3509ef..f0fc671b4b 100644 --- a/thirdparty/icu4c/common/unicode/uvernum.h +++ b/thirdparty/icu4c/common/unicode/uvernum.h @@ -53,7 +53,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION_MAJOR_NUM 72 +#define U_ICU_VERSION_MAJOR_NUM 73 /** The current ICU minor version as an integer. * This value will change in the subsequent releases of ICU @@ -79,7 +79,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ -#define U_ICU_VERSION_SUFFIX _72 +#define U_ICU_VERSION_SUFFIX _73 /** * \def U_DEF2_ICU_ENTRY_POINT_RENAME @@ -132,7 +132,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION "72.1" +#define U_ICU_VERSION "73.1" /** * The current ICU library major version number as a string, for library name suffixes. @@ -145,13 +145,13 @@ * * @stable ICU 2.6 */ -#define U_ICU_VERSION_SHORT "72" +#define U_ICU_VERSION_SHORT "73" #ifndef U_HIDE_INTERNAL_API /** Data version in ICU4C. * @internal ICU 4.4 Internal Use Only **/ -#define U_ICU_DATA_VERSION "72.1" +#define U_ICU_DATA_VERSION "73.1" #endif /* U_HIDE_INTERNAL_API */ /*=========================================================================== |