[Libreoffice-commits] core.git: svl/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Thu Apr 6 18:47:50 UTC 2017
svl/source/misc/strmadpt.cxx | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
New commits:
commit d8604338c4b289c01d311b95a5587b250f0d6ff2
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Thu Apr 6 12:22:56 2017 +0200
make page size compile time constant
on educated guess
> std::numeric_limits<sal_uInt32>::max() - sizeof(few fields) + 1
is always greater 1000
Change-Id: If0e91e27aabc2bda4beccb5e98eb20a7c890e2f0
Reviewed-on: https://gerrit.libreoffice.org/36201
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index c444838f84d9..1e36c637a388 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -54,6 +54,7 @@ private:
sal_uInt32 m_nOffset;
sal_Int8 m_aBuffer[1];
};
+ static const sal_uInt32 m_nPageSize = 1000;
std::multiset< sal_uInt32 > m_aMarks;
Page * m_pFirstPage;
@@ -62,7 +63,6 @@ private:
sal_Int8 * m_pReadBuffer;
sal_uInt32 m_nReadBufferSize;
sal_uInt32 m_nReadBufferFilled;
- sal_uInt32 m_nPageSize;
sal_uInt32 m_nPages;
bool m_bEOF;
@@ -95,10 +95,6 @@ SvDataPipe_Impl::SvDataPipe_Impl()
, m_pReadBuffer( nullptr )
, m_nReadBufferSize( 0 )
, m_nReadBufferFilled( 0 )
- , m_nPageSize(std::min< sal_uInt32 >(
- 1000,
- sal_uInt32(std::numeric_limits< sal_uInt32 >::max()
- - sizeof (Page) + 1)))
, m_nPages( 0 )
, m_bEOF( false )
{}
More information about the Libreoffice-commits
mailing list