diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-08 21:02:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-09 10:34:00 +0100 |
commit | 3d47d9d9b97b97459554a5e8376aef9aeeeda7d9 (patch) | |
tree | 515460cc90fbbbb1c6679e19bddfda4924a5ead5 /editeng | |
parent | ad62165065a0f96933d8b491770775bb57ac51bd (diff) |
cppcheck: unreadVariable
Change-Id: Ia16c1ba6052e8cf86762be095930b7e748f4493d
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/txtrange.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index b2964f15a5ee..b78163908c2f 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -531,8 +531,8 @@ void SvxBoundArgs::Concat( const tools::PolyPolygon* pPoly ) } else if( bSubtract ) // Subtract, if necessary separate { - long nOld; - if( nLeft > ( nOld = (*pOld)[ nLeftPos - 1 ] ) ) + const long nOld = (*pOld)[nLeftPos - 1]; + if (nLeft > nOld) { // Now we split the left part... if( nLeft - 1 > nOld ) { @@ -544,7 +544,7 @@ void SvxBoundArgs::Concat( const tools::PolyPolygon* pPoly ) } if( nRightPos - nLeftPos > 1 ) pOld->erase( pOld->begin() + nLeftPos, pOld->begin() + nRightPos - 1 ); - if( ++nRight >= ( nOld = (*pOld)[ nLeftPos ] ) ) + if (++nRight >= (*pOld)[nLeftPos]) pOld->erase( pOld->begin() + nLeftPos - 1, pOld->begin() + nLeftPos + 1 ); else (*pOld)[ nLeftPos - 1 ] = nRight; |