diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-03-10 20:13:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-03-10 20:13:31 +0000 |
commit | 1fab2dcba67cb3e787f53f21332239764f131774 (patch) | |
tree | 70ee356320a73585f71a47919d9363c5d3f3d492 /i18npool | |
parent | f7fd9e6613625c046e779426861548502def948a (diff) |
use SAL_N_ELEMENTS
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/breakiterator/breakiteratorImpl.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index b529fbf81f13..e13fb7a2a737 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -480,8 +480,6 @@ static sal_Int16 scriptTypes[] = { ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::WEAK}; -#define scriptTypesCount sizeof(scriptTypes) / sizeof(sal_Int16) - sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar) { static sal_uInt32 lastChar = 0; @@ -494,7 +492,7 @@ sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar) script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT); if (script < 0) nRet = ScriptType::WEAK; - else if (script >= scriptTypesCount) + else if (script >= SAL_N_ELEMENTS(scriptTypes)) nRet = ScriptType::COMPLEX; // anything new is going to be pretty wild else nRet = scriptTypes[script]; |