diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-29 10:14:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-29 10:16:30 +0100 |
commit | ae8d4fd4fd049fa020d59bf4c743c4f7d0788d43 (patch) | |
tree | e9a70acfb1ba7e1f3967e9b0163fe0d8038ba482 /svx | |
parent | f216d80d048fa4fedfdbdb0446b1521b0191b0cf (diff) |
nCnt calculation is overwritten anyway
Change-Id: Idf2693aaf31fc06e16df4b15766d29f029df896a
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 1abd869cff8c..b3fac6fb6413 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1066,16 +1066,14 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, if ( !pImpl->pRanges && pSSet ) { - sal_sSize nCnt = 0; const sal_uInt16* pPtr = pSSet->GetRanges(); const sal_uInt16* pTmp = pPtr; while( *pPtr ) { - nCnt += ( *(pPtr+1) - *pPtr ) + 1; pPtr += 2; } - nCnt = pPtr - pTmp + 1; + sal_sSize nCnt = pPtr - pTmp + 1; pImpl->pRanges.reset( new sal_uInt16[nCnt] ); memcpy( pImpl->pRanges.get(), pTmp, sizeof(sal_uInt16) * nCnt ); } |