From e698870caa3dff7234f0a4433b1751834b9e7811 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:09:23 +0300 Subject: Update ICU to 76.1 --- thirdparty/icu4c/common/rbbiscan.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'thirdparty/icu4c/common/rbbiscan.cpp') diff --git a/thirdparty/icu4c/common/rbbiscan.cpp b/thirdparty/icu4c/common/rbbiscan.cpp index f5fdba076f..cf2d63cd80 100644 --- a/thirdparty/icu4c/common/rbbiscan.cpp +++ b/thirdparty/icu4c/common/rbbiscan.cpp @@ -748,7 +748,7 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode // First check whether we've already cached a set for this string. // If so, just use the cached set in the new node. // delete any set provided by the caller, since we own it. - el = (RBBISetTableEl *)uhash_get(fSetTable, &s); + el = static_cast(uhash_get(fSetTable, &s)); if (el != nullptr) { delete setToAdopt; node->fLeftChild = el->val; @@ -794,7 +794,7 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode // // Add the new set to the set hash table. // - el = (RBBISetTableEl *)uprv_malloc(sizeof(RBBISetTableEl)); + el = static_cast(uprv_malloc(sizeof(RBBISetTableEl))); UnicodeString *tkey = new UnicodeString(s); if (tkey == nullptr || el == nullptr || setToAdopt == nullptr) { // Delete to avoid memory leak @@ -864,7 +864,7 @@ UChar32 RBBIRuleScanner::nextCharLL() { UChar32 ch; if (fNextIndex >= fRB->fRules.length()) { - return (UChar32)-1; + return static_cast(-1); } ch = fRB->fRules.char32At(fNextIndex); if (U_IS_SURROGATE(ch)) { @@ -939,7 +939,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { } } - if (c.fChar == (UChar32)-1) { + if (c.fChar == static_cast(-1)) { return; } if (fQuoteMode) { @@ -958,7 +958,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { int32_t commentStart = fScanIndex; for (;;) { c.fChar = nextCharLL(); - if (c.fChar == (UChar32)-1 || // EOF + if (c.fChar == static_cast(-1) || // EOF c.fChar == chCR || c.fChar == chLF || c.fChar == chNEL || @@ -968,7 +968,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { fRB->fStrippedRules.setCharAt(i, u' '); } } - if (c.fChar == (UChar32)-1) { + if (c.fChar == static_cast(-1)) { return; } @@ -1065,14 +1065,14 @@ void RBBIRuleScanner::parse() { // Table row specified "escaped P" and the char is either 'p' or 'P'. break; } - if (tableEl->fCharClass == 252 && fC.fChar == (UChar32)-1) { + if (tableEl->fCharClass == 252 && fC.fChar == static_cast(-1)) { // Table row specified eof and we hit eof on the input. break; } if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && // Table specs a char class && fC.fEscaped == false && // char is not escaped && - fC.fChar != (UChar32)-1) { // char is not EOF + fC.fChar != static_cast(-1)) { // char is not EOF U_ASSERT((tableEl->fCharClass-128) < UPRV_LENGTHOF(fRuleSets)); if (fRuleSets[tableEl->fCharClass-128].contains(fC.fChar)) { // Table row specified a character class, or set of characters, @@ -1090,7 +1090,7 @@ void RBBIRuleScanner::parse() { // We've found the row of the state table that matches the current input // character from the rules string. // Perform any action specified by this row in the state table. - if (doParseActions((int32_t)tableEl->fAction) == false) { + if (doParseActions(static_cast(tableEl->fAction)) == false) { // Break out of the state machine loop if the // the action signalled some kind of error, or // the action was to exit, occurs on normal end-of-rules-input. -- cgit v1.2.3