@@ -125,7 +125,7 @@ U_COMMON_API UnicodeString U_EXPORT2
125125unistr_internalConcat (const UnicodeString &s1, std::u16string_view s2) {
126126 int32_t sumLengths;
127127 if (s2.length () > INT32_MAX ||
128- uprv_add32_overflow (s1.length (), ( int32_t ) s2.length (), &sumLengths)) {
128+ uprv_add32_overflow (s1.length (), static_cast < int32_t >( s2.length () ), &sumLengths)) {
129129 UnicodeString bogus;
130130 bogus.setToBogus ();
131131 return bogus;
@@ -301,7 +301,7 @@ UnicodeString::UnicodeString(const char *src, int32_t length, EInvariant) {
301301UnicodeString UnicodeString::readOnlyAliasFromU16StringView (std::u16string_view text) {
302302 UnicodeString result;
303303 if (text.length () <= INT32_MAX) {
304- result.setTo (false , text.data (), ( int32_t ) text.length ());
304+ result.setTo (false , text.data (), static_cast < int32_t >( text.length () ));
305305 } else {
306306 result.setToBogus ();
307307 }
@@ -1622,7 +1622,7 @@ UnicodeString::doReplace(int32_t start, int32_t length, std::u16string_view src)
16221622 setToBogus ();
16231623 return *this ;
16241624 }
1625- return doReplace (start, length, src.data (), 0 , ( int32_t ) src.length ());
1625+ return doReplace (start, length, src.data (), 0 , static_cast < int32_t >( src.length () ));
16261626}
16271627
16281628// Versions of doReplace() only for append() variants.
@@ -1722,7 +1722,7 @@ UnicodeString::doAppend(std::u16string_view src) {
17221722 setToBogus ();
17231723 return *this ;
17241724 }
1725- return doAppend (src.data (), 0 , ( int32_t ) src.length ());
1725+ return doAppend (src.data (), 0 , static_cast < int32_t >( src.length () ));
17261726}
17271727
17281728/* *
0 commit comments