summaryrefslogtreecommitdiff
path: root/i18npool/source/breakiterator/breakiteratorImpl.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-03-10 20:20:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-03-10 20:20:39 +0000
commitdb54b681c729e0cc5ac75bd7ce9422fb64c585f8 (patch)
tree37545f5adca1da973a96e3723d7a97fc80f7ce74 /i18npool/source/breakiterator/breakiteratorImpl.cxx
parent1fab2dcba67cb3e787f53f21332239764f131774 (diff)
USCRIPT_INVALID_CODE is -1 so take signed here
Diffstat (limited to 'i18npool/source/breakiterator/breakiteratorImpl.cxx')
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx5
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];