diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-04-06 12:22:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-06 18:47:23 +0000 |
commit | d8604338c4b289c01d311b95a5587b250f0d6ff2 (patch) | |
tree | 4ed82d28388641f302f7e5625bc23e3118375372 /svl | |
parent | 6591934e66827bf01f1cff5bcbe7335fd5d5b970 (diff) |
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@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/misc/strmadpt.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
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 ) {} |