diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-03-10 20:20:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-03-10 20:20:39 +0000 |
commit | db54b681c729e0cc5ac75bd7ce9422fb64c585f8 (patch) | |
tree | 37545f5adca1da973a96e3723d7a97fc80f7ce74 /i18npool | |
parent | use SAL_N_ELEMENTS (diff) | |
download | core-db54b681c729e0cc5ac75bd7ce9422fb64c585f8.tar.gz core-db54b681c729e0cc5ac75bd7ce9422fb64c585f8.zip |
USCRIPT_INVALID_CODE is -1 so take signed here
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/breakiterator/breakiteratorImpl.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index e13fb7a2a737..5db6503a9095 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -484,15 +484,14 @@ sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar) { static sal_uInt32 lastChar = 0; static sal_Int16 nRet = 0; - sal_uInt32 script; if (currentChar != lastChar) { lastChar = currentChar; - script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT); + int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT); if (script < 0) nRet = ScriptType::WEAK; - else if (script >= SAL_N_ELEMENTS(scriptTypes)) + else if (static_cast<size_t>(script) >= SAL_N_ELEMENTS(scriptTypes)) nRet = ScriptType::COMPLEX; // anything new is going to be pretty wild else nRet = scriptTypes[script]; |