summaryrefslogtreecommitdiff
path: root/sc/inc/subtotalparam.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-16 16:12:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-16 20:45:33 +0200
commit203288c830041b41268f23b9aed5ad786a8e7ae6 (patch)
treed4c983405c3df00f4666979c5fc40fbae22924b8 /sc/inc/subtotalparam.hxx
parenta0796ca91174e317cdf280a35fb6a5dad2aef66f (diff)
fix leak in ScSubTotalParam
Change-Id: If839585931fc90b9910f6b95338d59ba48a1a78f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/subtotalparam.hxx')
-rw-r--r--sc/inc/subtotalparam.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/inc/subtotalparam.hxx b/sc/inc/subtotalparam.hxx
index d9701c5379d4..8e36dad83987 100644
--- a/sc/inc/subtotalparam.hxx
+++ b/sc/inc/subtotalparam.hxx
@@ -10,6 +10,7 @@
#pragma once
#include "global.hxx"
+#include <memory>
struct SC_DLLPUBLIC ScSubTotalParam
{
@@ -29,8 +30,8 @@ struct SC_DLLPUBLIC ScSubTotalParam
bool bGroupActive[MAXSUBTOTAL]; ///< active groups
SCCOL nField[MAXSUBTOTAL]; ///< associated field
SCCOL nSubTotals[MAXSUBTOTAL]; ///< number of SubTotals
- SCCOL* pSubTotals[MAXSUBTOTAL]; ///< array of columns to be calculated
- ScSubTotalFunc* pFunctions[MAXSUBTOTAL]; ///< array of associated functions
+ std::unique_ptr<SCCOL[]> pSubTotals[MAXSUBTOTAL]; ///< array of columns to be calculated
+ std::unique_ptr<ScSubTotalFunc[]> pFunctions[MAXSUBTOTAL]; ///< array of associated functions
ScSubTotalParam();
ScSubTotalParam( const ScSubTotalParam& r );