diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2018-06-21 22:20:04 +0900 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-21 17:11:26 +0200 |
commit | 39180f706f0c30771d55e065fca2e36d2c7bb7c7 (patch) | |
tree | 84513155a4afe7e9b529d2266a36046d1ab8d17e /sw | |
parent | 84fd1f453b5db67d5846e44b3e1b0cb14d0a5eb4 (diff) |
sw: Allocate enough space at once for micro optimization
Change-Id: Ibcf95f2ddeb7b0a9f08944d760beb40f2d8ae688
Reviewed-on: https://gerrit.libreoffice.org/56237
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/viscrs.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index b11db04d393f..f52f96e017ad 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -335,7 +335,7 @@ void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles) #if HAVE_FEATURE_DESKTOP // get new rects std::vector< basegfx::B2DRange > aNewRanges; - + aNewRanges.reserve(size()); for(size_type a = 0; a < size(); ++a) { const SwRect aNextRect((*this)[a]); @@ -414,6 +414,7 @@ void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles) } std::vector<OString> aRect; + aRect.reserve(size()); for (size_type i = 0; i < size(); ++i) { const SwRect& rRect = (*this)[i]; |