From 800a196718abbfd38d93c845e563e055ef778b04 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Tue, 12 Jul 2016 22:42:42 +0200 Subject: chart2: avoid use of realloc by using ctor initializer list, removing redundant realloc and other small tweaks Change-Id: I73775ef3677244de5c04e8743c43228d6cb3b008 Reviewed-on: https://gerrit.libreoffice.org/27174 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/source/view/axes/VCartesianGrid.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'chart2/source/view/axes/VCartesianGrid.cxx') diff --git a/chart2/source/view/axes/VCartesianGrid.cxx b/chart2/source/view/axes/VCartesianGrid.cxx index 028ab3b1942a..0b3de68f3301 100644 --- a/chart2/source/view/axes/VCartesianGrid.cxx +++ b/chart2/source/view/axes/VCartesianGrid.cxx @@ -57,7 +57,10 @@ GridLinePoints::GridLinePoints( const PlottingPositionHelper* pPosHelper, sal_In , CuboidPlanePosition eLeftWallPos , CuboidPlanePosition eBackWallPos , CuboidPlanePosition eBottomPos ) - : m_nDimensionIndex(nDimensionIndex) + : P0(3) + , P1(3) + , P2(3) + , m_nDimensionIndex(nDimensionIndex) { double MinX = pPosHelper->getLogicMinX(); double MinY = pPosHelper->getLogicMinY(); @@ -89,10 +92,6 @@ GridLinePoints::GridLinePoints( const PlottingPositionHelper* pPosHelper, sal_In } bool bSwapXY = pPosHelper->isSwapXAndY(); - P0.realloc(3); - P1.realloc(3); - P2.realloc(3); - //P0: point on 'back' wall, not on 'left' wall //P1: point on both walls //P2: point on 'left' wall not on 'back' wall -- cgit