summaryrefslogtreecommitdiffstats
path: root/thirdparty/icu4c/common/ustrcase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/ustrcase.cpp')
-rw-r--r--thirdparty/icu4c/common/ustrcase.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/thirdparty/icu4c/common/ustrcase.cpp b/thirdparty/icu4c/common/ustrcase.cpp
index 4c726d47db..58b5c5ef62 100644
--- a/thirdparty/icu4c/common/ustrcase.cpp
+++ b/thirdparty/icu4c/common/ustrcase.cpp
@@ -77,7 +77,7 @@ appendResult(char16_t *dest, int32_t destIndex, int32_t destCapacity,
}
c=~result;
if(destIndex<destCapacity && c<=0xffff) { // BMP slightly-fastpath
- dest[destIndex++]=(char16_t)c;
+ dest[destIndex++] = static_cast<char16_t>(c);
return destIndex;
}
length=cpLength;
@@ -86,7 +86,7 @@ appendResult(char16_t *dest, int32_t destIndex, int32_t destCapacity,
c=U_SENTINEL;
length=result;
} else if(destIndex<destCapacity && result<=0xffff) { // BMP slightly-fastpath
- dest[destIndex++]=(char16_t)result;
+ dest[destIndex++] = static_cast<char16_t>(result);
if(edits!=nullptr) {
edits->addReplace(cpLength, 1);
}
@@ -171,7 +171,7 @@ appendUnchanged(char16_t *dest, int32_t destIndex, int32_t destCapacity,
UChar32 U_CALLCONV
utf16_caseContextIterator(void *context, int8_t dir) {
- UCaseContext *csc=(UCaseContext *)context;
+ UCaseContext* csc = static_cast<UCaseContext*>(context);
UChar32 c;
if(dir<0) {
@@ -272,7 +272,7 @@ int32_t toLower(int32_t caseLocale, uint32_t options,
} else {
c = lead;
}
- const char16_t *s;
+ const char16_t *s = nullptr;
if (caseLocale >= 0) {
csc->cpStart = cpStart;
csc->cpLimit = srcIndex;
@@ -369,7 +369,7 @@ int32_t toUpper(int32_t caseLocale, uint32_t options,
c = lead;
}
csc->cpLimit = srcIndex;
- const char16_t *s;
+ const char16_t *s = nullptr;
c = ucase_toFullUpper(c, utf16_caseContextIterator, csc, &s, caseLocale);
if (c >= 0) {
destIndex = appendUnchanged(dest, destIndex, destCapacity,
@@ -579,8 +579,8 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it
}
if (c == u'I' || c == u'Í') {
- titleLimit = maybeTitleDutchIJ(src, c, titleStart + 1, index,
- dest, destIndex, destCapacity, options,
+ titleLimit = maybeTitleDutchIJ(src, c, titleStart + 1, index,
+ dest, destIndex, destCapacity, options,
edits);
}
}
@@ -1216,7 +1216,7 @@ int32_t toUpper(uint32_t options,
}
if (change) {
- destIndex=appendUChar(dest, destIndex, destCapacity, (char16_t)upper);
+ destIndex = appendUChar(dest, destIndex, destCapacity, static_cast<char16_t>(upper));
if (destIndex >= 0 && (data & HAS_EITHER_DIALYTIKA) != 0) {
destIndex=appendUChar(dest, destIndex, destCapacity, 0x308); // restore or add a dialytika
}
@@ -1698,7 +1698,7 @@ static int32_t _cmpFold(
*/
if( level1==0 &&
- (length=ucase_toFullFolding((UChar32)cp1, &p, options))>=0
+ (length = ucase_toFullFolding(cp1, &p, options)) >= 0
) {
/* cp1 case-folds to the code point "length" or to p[length] */
if(U_IS_SURROGATE(c1)) {
@@ -1744,7 +1744,7 @@ static int32_t _cmpFold(
}
if( level2==0 &&
- (length=ucase_toFullFolding((UChar32)cp2, &p, options))>=0
+ (length = ucase_toFullFolding(cp2, &p, options)) >= 0
) {
/* cp2 case-folds to the code point "length" or to p[length] */
if(U_IS_SURROGATE(c2)) {