diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-14 10:55:02 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-14 10:58:25 -0500 |
commit | df9243626b39742a9a148bea95796f8824fee68a (patch) | |
tree | d379108efde9e05bbd00bd953a02d040add64ef4 /sc/inc/columnspanset.hxx | |
parent | bbdb7b43e639b0dd27377d104c59fea3f8481b2a (diff) |
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.hxx | 18 |
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(); |