summaryrefslogtreecommitdiff
path: root/chart2/source/view/axes/VCartesianGrid.cxx
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-07-12 22:42:42 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-07-14 02:00:00 +0000
commit800a196718abbfd38d93c845e563e055ef778b04 (patch)
tree127621cd5185cc3d55f30981af90f820c47e8a72 /chart2/source/view/axes/VCartesianGrid.cxx
parentde162ef3c7d447e1faf3bc8d0766fc0e34d80b49 (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'chart2/source/view/axes/VCartesianGrid.cxx')
-rw-r--r--chart2/source/view/axes/VCartesianGrid.cxx9
1 files changed, 4 insertions, 5 deletions
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