diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-09-02 19:52:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-03 10:16:51 +0200 |
commit | a9a648fbf47f94151de0d525e432b45919ba7504 (patch) | |
tree | ae867e54131632a424012438648f02c97daaafeb /chart2 | |
parent | 925d26257f0dac02ba5f2c684394d21e60c76fff (diff) |
no need to allocate SeriesMinMaxType separately
Change-Id: I7121375a6bf731f8d30f69aa8c90b102675a8bb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121531
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index b5bfc8d871b0..dd3fec5bd61a 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1970,7 +1970,7 @@ class PerXMinMaxCalculator { typedef std::pair<double, double> MinMaxType; typedef std::map<size_t, MinMaxType> SeriesMinMaxType; - typedef std::map<double, std::unique_ptr<SeriesMinMaxType>> GroupMinMaxType; + typedef std::map<double, SeriesMinMaxType> GroupMinMaxType; typedef std::unordered_map<double, MinMaxType> TotalStoreType; GroupMinMaxType m_SeriesGroup; size_t mnCurSeries; @@ -2042,7 +2042,7 @@ private: { double fX = it.first; - const SeriesMinMaxType& rSeries = *it.second; + const SeriesMinMaxType& rSeries = it.second; for (auto const& series : rSeries) { double fYMin = series.second.first, fYMax = series.second.second; @@ -2069,7 +2069,7 @@ private: if (it == m_SeriesGroup.end()) { std::pair<GroupMinMaxType::iterator,bool> r = - m_SeriesGroup.insert(std::make_pair(fX, std::make_unique<SeriesMinMaxType>())); + m_SeriesGroup.insert(std::make_pair(fX, SeriesMinMaxType{})); if (!r.second) // insertion failed. @@ -2078,7 +2078,7 @@ private: it = r.first; } - return it->second.get(); + return &it->second; } }; |