aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/common/ucharstrieiterator.cpp
diff options
context:
space:
mode:
authorromankoshelev <romankoshelev@yandex-team.com>2024-11-13 19:25:49 +0300
committerromankoshelev <romankoshelev@yandex-team.com>2024-11-13 19:36:21 +0300
commit593d804b3cb5202c629726e873c66ce3eb20b1a7 (patch)
tree7beea96c7a5b0e0ecfa532385d7279079fc4a63b /contrib/libs/icu/common/ucharstrieiterator.cpp
parent4ab23311f7a6d45ac318179569df9ba46fb9ab68 (diff)
downloadydb-593d804b3cb5202c629726e873c66ce3eb20b1a7.tar.gz
Update ICU to 76.1
commit_hash:908cd3760bb1e3e7ffecef62acf9b632d8ca31a4
Diffstat (limited to 'contrib/libs/icu/common/ucharstrieiterator.cpp')
-rw-r--r--contrib/libs/icu/common/ucharstrieiterator.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/libs/icu/common/ucharstrieiterator.cpp b/contrib/libs/icu/common/ucharstrieiterator.cpp
index 176aed6825..8a212b8b36 100644
--- a/contrib/libs/icu/common/ucharstrieiterator.cpp
+++ b/contrib/libs/icu/common/ucharstrieiterator.cpp
@@ -114,7 +114,7 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) {
pos=uchars_+stack_->elementAti(stackSize-2);
stack_->setSize(stackSize-2);
str_.truncate(length&0xffff);
- length=(int32_t)((uint32_t)length>>16);
+ length = static_cast<int32_t>(static_cast<uint32_t>(length) >> 16);
if(length>1) {
pos=branchNext(pos, length, errorCode);
if(pos==nullptr) {
@@ -138,7 +138,7 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) {
skipValue_=false;
} else {
// Deliver value for the string so far.
- UBool isFinal=(UBool)(node>>15);
+ UBool isFinal = static_cast<UBool>(node >> 15);
if(isFinal) {
value_=readValue(pos, node&0x7fff);
} else {
@@ -187,7 +187,7 @@ UCharsTrie::Iterator::branchNext(const char16_t *pos, int32_t length, UErrorCode
while(length>kMaxBranchLinearSubNodeLength) {
++pos; // ignore the comparison unit
// Push state for the greater-or-equal edge.
- stack_->addElement((int32_t)(skipDelta(pos)-uchars_), errorCode);
+ stack_->addElement(static_cast<int32_t>(skipDelta(pos) - uchars_), errorCode);
stack_->addElement(((length-(length>>1))<<16)|str_.length(), errorCode);
// Follow the less-than edge.
length>>=1;
@@ -197,10 +197,10 @@ UCharsTrie::Iterator::branchNext(const char16_t *pos, int32_t length, UErrorCode
// Read the first (key, value) pair.
char16_t trieUnit=*pos++;
int32_t node=*pos++;
- UBool isFinal=(UBool)(node>>15);
+ UBool isFinal = static_cast<UBool>(node >> 15);
int32_t value=readValue(pos, node&=0x7fff);
pos=skipValue(pos, node);
- stack_->addElement((int32_t)(pos-uchars_), errorCode);
+ stack_->addElement(static_cast<int32_t>(pos - uchars_), errorCode);
stack_->addElement(((length-1)<<16)|str_.length(), errorCode);
str_.append(trieUnit);
if(isFinal) {