summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-11 13:47:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-11 13:53:25 +0000
commitc67cc960ce344f4cb7a0be785ee69e08e72e6fbb (patch)
tree8da8be2888c255a5a6aa494d3241f50fb81de530 /i18npool
parent39831d90d9c3d0f714e39ef11799fabe8cc13563 (diff)
coverity#704236 Logically dead code
the nStartPos > 0 check is inside a nStartPos == 0 block so it can't happen so we'll return immediately, and so there's no point changing numberOfChange in that case either there Change-Id: Id6d7fc31033de5c6f3bb0a9ed03234b58c0d509e
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index e56256b4aee7..db36852085a3 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -329,12 +329,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::previousScript( const OUString& Text,
if ((((numberOfChange % 2) == 0) != (ScriptType != getScriptClass(ch))))
numberOfChange--;
else if (nStartPos == 0) {
- if (numberOfChange > 0)
- numberOfChange--;
- if (nStartPos > 0)
- Text.iterateCodePoints(&nStartPos, -1);
- else
- return -1;
+ return -1;
}
}
return numberOfChange == 0 ? iterateCodePoints(Text, nStartPos, 1, ch) : -1;