From 18d112f4be4a36a00376d6e23b89e3d8d3c56060 Mon Sep 17 00:00:00 2001 From: Zdibák Zoltán Date: Sat, 10 Nov 2018 13:14:21 +0100 Subject: cppCheck redundantAssignment Change-Id: Ib9203fa65d7b9825b0a7181dcfc0f522bc575541 Reviewed-on: https://gerrit.libreoffice.org/63242 Tested-by: Jenkins Reviewed-by: Julien Nabet --- chart2/source/view/charttypes/BarChart.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 6c50ba35aeea..51dba0143bf2 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -550,12 +550,9 @@ void BarChart::createShapes() double fSlotX=0; for( auto& rXSlot : rZSlot ) { - sal_Int32 nAttachedAxisIndex = 0; - BarPositionHelper* pPosHelper = m_pMainPosHelper.get(); - - nAttachedAxisIndex = rXSlot.getAttachedAxisIndexForFirstSeries(); + sal_Int32 nAttachedAxisIndex = rXSlot.getAttachedAxisIndexForFirstSeries(); //2ND_AXIS_IN_BARS so far one can assume to have the same plotter for each z slot - pPosHelper = dynamic_cast(&( getPlottingPositionHelper( nAttachedAxisIndex ) ) ); + BarPositionHelper* pPosHelper = dynamic_cast(&( getPlottingPositionHelper( nAttachedAxisIndex ) ) ); if(!pPosHelper) pPosHelper = m_pMainPosHelper.get(); -- cgit