diff options
Diffstat (limited to 'thirdparty/icu4c/common/rbbisetb.cpp')
-rw-r--r-- | thirdparty/icu4c/common/rbbisetb.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/thirdparty/icu4c/common/rbbisetb.cpp b/thirdparty/icu4c/common/rbbisetb.cpp index e6c72954bc..6c22cf470f 100644 --- a/thirdparty/icu4c/common/rbbisetb.cpp +++ b/thirdparty/icu4c/common/rbbisetb.cpp @@ -120,7 +120,7 @@ void RBBISetBuilder::buildRanges() { // int ni; for (ni=0; ; ni++) { // Loop over each of the UnicodeSets encountered in the input rules - usetNode = (RBBINode *)this->fRB->fUSetNodes->elementAt(ni); + usetNode = static_cast<RBBINode*>(this->fRB->fUSetNodes->elementAt(ni)); if (usetNode==nullptr) { break; } @@ -251,7 +251,7 @@ void RBBISetBuilder::buildRanges() { UnicodeString eofString(u"eof"); UnicodeString bofString(u"bof"); for (ni=0; ; ni++) { // Loop over each of the UnicodeSets encountered in the input rules - usetNode = (RBBINode *)this->fRB->fUSetNodes->elementAt(ni); + usetNode = static_cast<RBBINode*>(this->fRB->fUSetNodes->elementAt(ni)); if (usetNode==nullptr) { break; } @@ -369,7 +369,7 @@ void RBBISetBuilder::addValToSets(UVector *sets, uint32_t val) { int32_t ix; for (ix=0; ix<sets->size(); ix++) { - RBBINode *usetNode = (RBBINode *)sets->elementAt(ix); + RBBINode* usetNode = static_cast<RBBINode*>(sets->elementAt(ix)); addValToSet(usetNode, val); } } @@ -380,7 +380,7 @@ void RBBISetBuilder::addValToSet(RBBINode *usetNode, uint32_t val) { *fStatus = U_MEMORY_ALLOCATION_ERROR; return; } - leafNode->fVal = (unsigned short)val; + leafNode->fVal = static_cast<unsigned short>(val); if (usetNode->fLeftChild == nullptr) { usetNode->fLeftChild = leafNode; leafNode->fParent = usetNode; @@ -441,7 +441,7 @@ UBool RBBISetBuilder::sawBOF() const { //------------------------------------------------------------------------ UChar32 RBBISetBuilder::getFirstChar(int32_t category) const { RangeDescriptor *rlRange; - UChar32 retVal = (UChar32)-1; + UChar32 retVal = static_cast<UChar32>(-1); for (rlRange = fRangeList; rlRange!=nullptr; rlRange=rlRange->fNext) { if (rlRange->fNum == category) { retVal = rlRange->fStartChar; @@ -674,7 +674,7 @@ void RangeDescriptor::split(UChar32 where, UErrorCode &status) { bool RangeDescriptor::isDictionaryRange() { static const char16_t *dictionary = u"dictionary"; for (int32_t i=0; i<fIncludesSets->size(); i++) { - RBBINode *usetNode = (RBBINode *)fIncludesSets->elementAt(i); + RBBINode* usetNode = static_cast<RBBINode*>(fIncludesSets->elementAt(i)); RBBINode *setRef = usetNode->fParent; if (setRef != nullptr) { RBBINode *varRef = setRef->fParent; |