summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-09-05 11:53:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-10 17:11:00 +0100
commit242320d303d43a34ce2255a07783fbd51e253cd0 (patch)
tree14bd7757a57784a18d1aa2b731eb71999d14bf94 /sot
parent8523fb2b37a2cdd2c3743795bb33cf30a57c5385 (diff)
new loplugin:reducevarscope
Change-Id: Iefe922c2e0d605114d54673d63eccc5e4abd545d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102143 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgavl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx
index 0c78054045f0..98a86f3edb96 100644
--- a/sot/source/sdstor/stgavl.cxx
+++ b/sot/source/sdstor/stgavl.cxx
@@ -284,7 +284,7 @@ void StgAvlNode::StgEnum( short& n )
bool StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
{
- StgAvlNode* pPivot, *pHeavy, *pNewRoot, *pParent, *pPrev;
+ StgAvlNode* pPivot, *pHeavy, *pParent, *pPrev;
if ( !pRoot )
return false;
@@ -310,6 +310,7 @@ bool StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
short nDelta = pPivot->Adjust( &pHeavy, pIns );
if( pPivot->m_nBalance >= 2 || pPivot->m_nBalance <= -2 )
{
+ StgAvlNode* pNewRoot;
pHeavy = ( nDelta < 0 ) ? pPivot->m_pRight : pPivot->m_pLeft;
// left imbalance
if( nDelta > 0 )