diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 11:47:44 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 17:11:45 +0100 |
commit | ca2888fd9ef5547410d616ef1a19e94bfe3fe37c (patch) | |
tree | a80015aec8056d9ffeb62ed383914f6e17e7c543 /i18npool | |
parent | Remove odd code that does not make any sense (diff) | |
download | core-ca2888fd9ef5547410d616ef1a19e94bfe3fe37c.tar.gz core-ca2888fd9ef5547410d616ef1a19e94bfe3fe37c.zip |
Use proper bool operations
Change-Id: I674ee59803fa5a1987787cf98f369dee63729adf
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/breakiterator/breakiteratorImpl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index fb44d733d9ff..a8e453da2d60 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -326,7 +326,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::previousScript( const OUString& Text, sal_uInt32 ch=0; while (numberOfChange > 0 && iterateCodePoints(Text, nStartPos, -1, ch) >= 0) { - if ((((numberOfChange % 2) == 0) ^ (ScriptType != getScriptClass(ch)))) + if ((((numberOfChange % 2) == 0) != (ScriptType != getScriptClass(ch)))) numberOfChange--; else if (nStartPos == 0) { if (numberOfChange > 0) @@ -399,7 +399,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::nextCharBlock( const OUString& Text, sal_I sal_uInt32 ch=0; while (numberOfChange > 0 && iterateCodePoints(Text, nStartPos, 1, ch) < strLen) { - if ((CharType != (sal_Int16)u_charType(ch)) ^ (numberOfChange == 1)) + if ((CharType != (sal_Int16)u_charType(ch)) != (numberOfChange == 1)) numberOfChange--; } return numberOfChange == 0 ? nStartPos : -1; @@ -415,7 +415,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::previousCharBlock( const OUString& Text, s sal_uInt32 ch=0; while (numberOfChange > 0 && iterateCodePoints(Text, nStartPos, -1, ch) >= 0) { - if (((numberOfChange % 2) == 0) ^ (CharType != (sal_Int16)u_charType(ch))) + if (((numberOfChange % 2) == 0) != (CharType != (sal_Int16)u_charType(ch))) numberOfChange--; if (nStartPos == 0 && numberOfChange > 0) { numberOfChange--; |