summaryrefslogtreecommitdiffstats
path: root/thirdparty/icu4c/common/dictionarydata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/dictionarydata.cpp')
-rw-r--r--thirdparty/icu4c/common/dictionarydata.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/thirdparty/icu4c/common/dictionarydata.cpp b/thirdparty/icu4c/common/dictionarydata.cpp
index 80b6d82d56..4bae0c6d33 100644
--- a/thirdparty/icu4c/common/dictionarydata.cpp
+++ b/thirdparty/icu4c/common/dictionarydata.cpp
@@ -47,13 +47,13 @@ int32_t UCharsDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t
int32_t *prefix) const {
UCharsTrie uct(characters);
- int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text);
+ int32_t startingTextIndex = static_cast<int32_t>(utext_getNativeIndex(text));
int32_t wordCount = 0;
int32_t codePointsMatched = 0;
for (UChar32 c = utext_next32(text); c >= 0; c=utext_next32(text)) {
UStringTrieResult result = (codePointsMatched == 0) ? uct.first(c) : uct.next(c);
- int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - startingTextIndex;
+ int32_t lengthMatched = static_cast<int32_t>(utext_getNativeIndex(text)) - startingTextIndex;
codePointsMatched += 1;
if (USTRINGTRIE_HAS_VALUE(result)) {
if (wordCount < limit) {
@@ -101,7 +101,7 @@ UChar32 BytesDictionaryMatcher::transform(UChar32 c) const {
if (delta < 0 || 0xFD < delta) {
return U_SENTINEL;
}
- return (UChar32)delta;
+ return static_cast<UChar32>(delta);
}
return c;
}
@@ -114,13 +114,13 @@ int32_t BytesDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t
int32_t *lengths, int32_t *cpLengths, int32_t *values,
int32_t *prefix) const {
BytesTrie bt(characters);
- int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text);
+ int32_t startingTextIndex = static_cast<int32_t>(utext_getNativeIndex(text));
int32_t wordCount = 0;
int32_t codePointsMatched = 0;
for (UChar32 c = utext_next32(text); c >= 0; c=utext_next32(text)) {
UStringTrieResult result = (codePointsMatched == 0) ? bt.first(transform(c)) : bt.next(transform(c));
- int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - startingTextIndex;
+ int32_t lengthMatched = static_cast<int32_t>(utext_getNativeIndex(text)) - startingTextIndex;
codePointsMatched += 1;
if (USTRINGTRIE_HAS_VALUE(result)) {
if (wordCount < limit) {