summaryrefslogtreecommitdiffstats
path: root/sc/inc/columnspanset.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-01-14 10:55:02 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-01-14 10:58:25 -0500
commitdf9243626b39742a9a148bea95796f8824fee68a (patch)
treed379108efde9e05bbd00bd953a02d040add64ef4 /sc/inc/columnspanset.hxx
parentsc: re-work ScHorizontalCellIterator to try to improve performance. (diff)
downloadcore-df9243626b39742a9a148bea95796f8824fee68a.tar.gz
core-df9243626b39742a9a148bea95796f8824fee68a.zip
fdo#73606: Avoid excessive and unnecessary heap allocation of array objects.
This is a leftover from the 1 million row conversion we did years ago. Change-Id: Ib50819ed51c7017bcc559bfc8b6062ff46615d09
Diffstat (limited to 'sc/inc/columnspanset.hxx')
-rw-r--r--sc/inc/columnspanset.hxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/inc/columnspanset.hxx b/sc/inc/columnspanset.hxx
index 98533e240f37..62e96a8a41bd 100644
--- a/sc/inc/columnspanset.hxx
+++ b/sc/inc/columnspanset.hxx
@@ -25,6 +25,14 @@ namespace sc {
struct ColumnBlockConstPosition;
+struct RowSpan
+{
+ SCROW mnRow1;
+ SCROW mnRow2;
+
+ RowSpan(SCROW nRow1, SCROW nRow2);
+};
+
/**
* Structure that stores segments of boolean flags per column, and perform
* custom action on those segments.
@@ -85,15 +93,7 @@ class SingleColumnSpanSet
public:
typedef mdds::flat_segment_tree<SCROW, bool> ColumnSpansType;
- struct Span
- {
- SCROW mnRow1;
- SCROW mnRow2;
-
- Span(SCROW nRow1, SCROW nRow2) : mnRow1(nRow1), mnRow2(nRow2) {}
- };
-
- typedef std::vector<Span> SpansType;
+ typedef std::vector<RowSpan> SpansType;
SingleColumnSpanSet();