comphelper/source/streaming/memorystream.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9b7729c6e224dfbe89e309aab8e8fd392fc234ad
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jul 8 09:30:13 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jul 8 10:44:34 2019 +0200

    revert part of "small optimisations"
    
    from
        commit ad1e790d76492ca4465114ad17e32912242db34f
        Date:   Fri Jul 5 14:12:24 2019 +0200
        small optimisations
    I had in mind that resize() always changes capacity to the specified
    value, but it actually follows the normal capacity expansion strategy
    for vector
    
    Change-Id: Idf677825d0f1f95b87110a3789ba95356d3771aa
    Reviewed-on: https://gerrit.libreoffice.org/75193
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/comphelper/source/streaming/memorystream.cxx 
b/comphelper/source/streaming/memorystream.cxx
index 4477cd068188..741c4346d310 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -197,7 +197,7 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< 
sal_Int8 >& aData )
         }
 
         if( static_cast< sal_Int32 >( nNewSize ) > static_cast< sal_Int32 >( 
maData.size() ) )
-            maData.insert( maData.end(), nNewSize - maData.size(), 0 );
+            maData.resize( nNewSize );
 
         sal_Int8* pData = &(*maData.begin());
         sal_Int8* pCursor = &(pData[mnCursor]);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to