diff options
Diffstat (limited to 'sal/textenc/convertgb18030.cxx')
-rw-r--r-- | sal/textenc/convertgb18030.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sal/textenc/convertgb18030.cxx b/sal/textenc/convertgb18030.cxx index 28ddd9335bb8..87e814674bb7 100644 --- a/sal/textenc/convertgb18030.cxx +++ b/sal/textenc/convertgb18030.cxx @@ -102,7 +102,7 @@ sal_Size ImplConvertGb18030ToUnicode(void const * pData, case IMPL_GB_18030_TO_UNICODE_STATE_0: if (nChar < 0x80) if (pDestBufPtr != pDestBufEnd) - *pDestBufPtr++ = (sal_Unicode) nChar; + *pDestBufPtr++ = static_cast<sal_Unicode>(nChar); else goto no_output; else if (nChar == 0x80) @@ -167,9 +167,9 @@ sal_Size ImplConvertGb18030ToUnicode(void const * pData, { nCode -= 189000 - 0x10000; *pDestBufPtr++ - = (sal_Unicode) ImplGetHighSurrogate(nCode); + = static_cast<sal_Unicode>(ImplGetHighSurrogate(nCode)); *pDestBufPtr++ - = (sal_Unicode) ImplGetLowSurrogate(nCode); + = static_cast<sal_Unicode>(ImplGetLowSurrogate(nCode)); } else goto no_output; @@ -197,8 +197,7 @@ sal_Size ImplConvertGb18030ToUnicode(void const * pData, { if (pDestBufPtr != pDestBufEnd) *pDestBufPtr++ - = (sal_Unicode) - (pRange->m_nFirstUnicode + = static_cast<sal_Unicode>(pRange->m_nFirstUnicode + (nCode - pRange-> m_nFirstLinear)); @@ -314,7 +313,7 @@ sal_Size ImplConvertUnicodeToGb18030(void const * pData, { if (ImplIsHighSurrogate(nChar)) { - nHighSurrogate = (sal_Unicode) nChar; + nHighSurrogate = static_cast<sal_Unicode>(nChar); continue; } } @@ -381,7 +380,7 @@ sal_Size ImplConvertUnicodeToGb18030(void const * pData, break; } nFirstNonRange - = (sal_Unicode) ((pRange++)->m_nLastUnicode + 1); + = static_cast<sal_Unicode>((pRange++)->m_nLastUnicode + 1); } } else |