summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-19 09:29:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-19 15:37:42 +0200
commit5cafa5a378bd18b7136aa178a267e3f5e386964a (patch)
tree705307f23aff54d11e04d6fe6eaa24e6a1f9ea1a /sot
parentc0a035d20f2f2f52c3d6f6b216ea3cd068ea2baa (diff)
reserve vector in StgCache::Commit()
Change-Id: I7d1253c9c8bba5801f942cb79f63d56d26481c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134601 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgcache.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx
index 2a7e9493f5bf..93f7d3090c93 100644
--- a/sot/source/sdstor/stgcache.cxx
+++ b/sot/source/sdstor/stgcache.cxx
@@ -206,6 +206,7 @@ bool StgCache::Commit()
if ( Good() ) // otherwise Write does nothing
{
std::vector< StgPage * > aToWrite;
+ aToWrite.reserve(maDirtyPages.size());
for (const auto& rEntry : maDirtyPages)
aToWrite.push_back( rEntry.second.get() );