sot/source/sdstor/stgcache.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5cafa5a378bd18b7136aa178a267e3f5e386964a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu May 19 09:29:43 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu May 19 15:37:42 2022 +0200

    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.gran...@collabora.co.uk>

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() );
 

Reply via email to