diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-12 09:31:41 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-09-12 08:53:09 +0000 |
commit | 1013587c03d168b54349b5d47c8359e97acc0ad5 (patch) | |
tree | 64c2e75aedfcdba21264983f68f55de94877f48e /package | |
parent | feb54746b2e3227466488f0f9be661f7df92358a (diff) |
loplugin:constantparam in package..stoc
Change-Id: I04b6d14d3dd8d55ccc4d4eb9313bc37959690672
Reviewed-on: https://gerrit.libreoffice.org/28824
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/inc/ZipOutputStream.hxx | 3 | ||||
-rw-r--r-- | package/inc/ZipPackageBuffer.hxx | 2 | ||||
-rw-r--r-- | package/source/xstor/ohierarchyholder.cxx | 4 | ||||
-rw-r--r-- | package/source/xstor/ohierarchyholder.hxx | 4 | ||||
-rw-r--r-- | package/source/zipapi/ZipOutputStream.cxx | 4 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 4 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageBuffer.cxx | 5 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 2 |
8 files changed, 14 insertions, 14 deletions
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx index 0149ade330bd..e532c3add02a 100644 --- a/package/inc/ZipOutputStream.hxx +++ b/package/inc/ZipOutputStream.hxx @@ -78,8 +78,7 @@ private: public: void reduceScheduledThreadsToGivenNumberOrLess( - sal_Int32 nThreads, - sal_Int32 nWaitTimeInTenthSeconds); + sal_Int32 nThreads); const std::shared_ptr<comphelper::ThreadTaskTag>& getThreadTaskTag() { return mpThreadTaskTag; } }; diff --git a/package/inc/ZipPackageBuffer.hxx b/package/inc/ZipPackageBuffer.hxx index 8278b3db7e2e..6873d7b45065 100644 --- a/package/inc/ZipPackageBuffer.hxx +++ b/package/inc/ZipPackageBuffer.hxx @@ -36,7 +36,7 @@ protected: sal_Int64 m_nBufferSize, m_nEnd, m_nCurrent; bool m_bMustInitBuffer; public: - ZipPackageBuffer(sal_Int64 nNewBufferSize); + ZipPackageBuffer(); virtual ~ZipPackageBuffer(); inline void realloc ( sal_Int32 nSize ) { m_aBuffer.realloc ( nSize ); } diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx index 4d84e2d6758b..a173f7990406 100644 --- a/package/source/xstor/ohierarchyholder.cxx +++ b/package/source/xstor/ohierarchyholder.cxx @@ -138,7 +138,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea if ( !xChildStorage.is() ) throw uno::RuntimeException(); - aElement = new OHierarchyElement_Impl( nullptr, xChildStorage ); + aElement = new OHierarchyElement_Impl( xChildStorage ); } xResult = aElement->GetStreamHierarchically( nStorageMode, aListPath, nStreamMode, aEncryptionData ); @@ -195,7 +195,7 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aList if ( !xChildStorage.is() ) throw uno::RuntimeException(); - aElement = new OHierarchyElement_Impl( nullptr, xChildStorage ); + aElement = new OHierarchyElement_Impl( xChildStorage ); } aElement->RemoveStreamHierarchically( aListPath ); diff --git a/package/source/xstor/ohierarchyholder.hxx b/package/source/xstor/ohierarchyholder.hxx index f9d6a97bcb19..e8ae40d7216b 100644 --- a/package/source/xstor/ohierarchyholder.hxx +++ b/package/source/xstor/ohierarchyholder.hxx @@ -65,8 +65,8 @@ struct OHierarchyElement_Impl : public cppu::WeakImplHelper< css::embed::XTransa OWeakStorRefList_Impl m_aOpenStreams; public: - OHierarchyElement_Impl( OHierarchyElement_Impl* pParent, const css::uno::Reference< css::embed::XStorage >& xStorage ) - : m_rParent( pParent ) + OHierarchyElement_Impl( const css::uno::Reference< css::embed::XStorage >& xStorage ) + : m_rParent( nullptr ) , m_xOwnStorage( xStorage ) {} diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index 4db3aba3c362..38039636b56d 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -158,7 +158,7 @@ void ZipOutputStream::consumeAllScheduledThreadEntries() } } -void ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(sal_Int32 nThreads, sal_Int32 nWaitTimeInTenthSeconds) +void ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(sal_Int32 nThreads) { while(static_cast< sal_Int32 >(m_aEntries.size()) > nThreads) { @@ -166,7 +166,7 @@ void ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(sal_Int32 nThrea if(static_cast< sal_Int32 >(m_aEntries.size()) > nThreads) { - const TimeValue aTimeValue(0, 100000 * nWaitTimeInTenthSeconds); + const TimeValue aTimeValue(0, 100000); osl_waitThread(&aTimeValue); } } diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 26f6dd269613..c35eb8a6fbf1 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -1009,7 +1009,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Seq // Write the manifest uno::Reference < XManifestWriter > xWriter = ManifestWriter::create( m_xContext ); ZipEntry * pEntry = new ZipEntry; - ZipPackageBuffer *pBuffer = new ZipPackageBuffer( n_ConstBufferSize ); + ZipPackageBuffer *pBuffer = new ZipPackageBuffer; uno::Reference < XOutputStream > xManOutStream( *pBuffer, UNO_QUERY ); pEntry->sPath = "META-INF/manifest.xml"; @@ -1035,7 +1035,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Seq void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno::Sequence < PropertyValue > >& aManList ) { ZipEntry* pEntry = new ZipEntry; - ZipPackageBuffer *pBuffer = new ZipPackageBuffer( n_ConstBufferSize ); + ZipPackageBuffer *pBuffer = new ZipPackageBuffer; uno::Reference< io::XOutputStream > xConTypeOutStream( *pBuffer, UNO_QUERY ); pEntry->sPath = "[Content_Types].xml"; diff --git a/package/source/zippackage/ZipPackageBuffer.cxx b/package/source/zippackage/ZipPackageBuffer.cxx index 00f2640114b9..904c3957a916 100644 --- a/package/source/zippackage/ZipPackageBuffer.cxx +++ b/package/source/zippackage/ZipPackageBuffer.cxx @@ -18,6 +18,7 @@ */ #include <ZipPackageBuffer.hxx> +#include <PackageConstants.hxx> #include <string.h> using namespace ::com::sun::star; @@ -31,8 +32,8 @@ using com::sun::star::lang::IllegalArgumentException; #define THROW_WHERE "" #endif -ZipPackageBuffer::ZipPackageBuffer(sal_Int64 nNewBufferSize ) -: m_nBufferSize (nNewBufferSize) +ZipPackageBuffer::ZipPackageBuffer() +: m_nBufferSize (n_ConstBufferSize) , m_nEnd(0) , m_nCurrent(0) , m_bMustInitBuffer ( true ) diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index a07fa0f956e0..45d1dcb9be56 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -845,7 +845,7 @@ bool ZipPackageStream::saveChild( // 2nd parameter is the time to wait between cleanups in 10th of a second. // Both values may be added to the configuration settings if needed. static sal_Int32 nAllowedThreads(comphelper::ThreadPool::getPreferredConcurrency() * 4); - rZipOut.reduceScheduledThreadsToGivenNumberOrLess(nAllowedThreads, 1); + rZipOut.reduceScheduledThreadsToGivenNumberOrLess(nAllowedThreads); // Start a new thread deflating this zip entry ZipOutputEntry *pZipEntry = new ZipOutputEntry( |