diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/AreaChart.cxx | 6 | ||||
-rw-r--r-- | chart2/source/view/charttypes/NetChart.cxx | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index c7d9f70f5ef1..f6f6d7b17d90 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -592,13 +592,15 @@ namespace void lcl_reorderSeries( ::std::vector< ::std::vector< VDataSeriesGroup > >& rZSlots ) { - ::std::vector< ::std::vector< VDataSeriesGroup > > aRet( rZSlots.size() ); + ::std::vector< ::std::vector< VDataSeriesGroup > > aRet; + aRet.reserve( rZSlots.size() ); ::std::vector< ::std::vector< VDataSeriesGroup > >::reverse_iterator aZIt( rZSlots.rbegin() ); ::std::vector< ::std::vector< VDataSeriesGroup > >::reverse_iterator aZEnd( rZSlots.rend() ); for( ; aZIt != aZEnd; ++aZIt ) { - ::std::vector< VDataSeriesGroup > aXSlot( aZIt->size() ); + ::std::vector< VDataSeriesGroup > aXSlot; + aXSlot.reserve( aZIt->size() ); ::std::vector< VDataSeriesGroup >::reverse_iterator aXIt( aZIt->rbegin() ); ::std::vector< VDataSeriesGroup >::reverse_iterator aXEnd( aZIt->rend() ); diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx index 1c0d2cd6bbe8..664c2dcdd5b7 100644 --- a/chart2/source/view/charttypes/NetChart.cxx +++ b/chart2/source/view/charttypes/NetChart.cxx @@ -297,13 +297,15 @@ namespace void lcl_reorderSeries( ::std::vector< ::std::vector< VDataSeriesGroup > >& rZSlots ) { - ::std::vector< ::std::vector< VDataSeriesGroup > > aRet( rZSlots.size() ); + ::std::vector< ::std::vector< VDataSeriesGroup > > aRet; + aRet.reserve( rZSlots.size() ); ::std::vector< ::std::vector< VDataSeriesGroup > >::reverse_iterator aZIt( rZSlots.rbegin() ); ::std::vector< ::std::vector< VDataSeriesGroup > >::reverse_iterator aZEnd( rZSlots.rend() ); for( ; aZIt != aZEnd; ++aZIt ) { - ::std::vector< VDataSeriesGroup > aXSlot( aZIt->size() ); + ::std::vector< VDataSeriesGroup > aXSlot; + aXSlot.reserve( aZIt->size() ); ::std::vector< VDataSeriesGroup >::reverse_iterator aXIt( aZIt->rbegin() ); ::std::vector< VDataSeriesGroup >::reverse_iterator aXEnd( aZIt->rend() ); |