From 455e4011f7052c5d1fb4693a573e0998cf6badc8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 1 Nov 2017 15:54:13 +0200 Subject: improve constparam loplugin lots of little fixes to make the logic less pessimistic Change-Id: If368822984250b11b98c56f5890177a1402e8660 Reviewed-on: https://gerrit.libreoffice.org/44168 Tested-by: Jenkins Reviewed-by: Noel Grandin --- store/source/storbios.cxx | 18 +++++++++--------- store/source/store.cxx | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'store') diff --git a/store/source/storbios.cxx b/store/source/storbios.cxx index a4935d3930bf..5d42354b6a62 100644 --- a/store/source/storbios.cxx +++ b/store/source/storbios.cxx @@ -195,7 +195,7 @@ struct SuperBlockPage /** save. */ - storeError save (OStorePageBIOS & rBIOS, sal_uInt32 nSize = theSize) + storeError save (OStorePageBIOS const & rBIOS, sal_uInt32 nSize = theSize) { m_aSuperOne.guard(); m_aSuperTwo = m_aSuperOne; @@ -205,20 +205,20 @@ struct SuperBlockPage /** Page allocation. */ storeError unusedHead ( - OStorePageBIOS & rBIOS, + OStorePageBIOS const & rBIOS, PageData & rPageHead); storeError unusedPop ( - OStorePageBIOS & rBIOS, + OStorePageBIOS const & rBIOS, PageData const & rPageHead); storeError unusedPush ( - OStorePageBIOS & rBIOS, + OStorePageBIOS const & rBIOS, sal_uInt32 nAddr); /** verify (with repair). */ - storeError verify (OStorePageBIOS & rBIOS); + storeError verify (OStorePageBIOS const & rBIOS); }; } // namespace store @@ -231,7 +231,7 @@ struct SuperBlockPage /* * unusedHead(): get freelist head (alloc page, step 1). */ -storeError SuperBlockPage::unusedHead (OStorePageBIOS & rBIOS, PageData & rPageHead) +storeError SuperBlockPage::unusedHead (OStorePageBIOS const & rBIOS, PageData & rPageHead) { storeError eErrCode = verify (rBIOS); if (eErrCode != store_E_None) @@ -274,7 +274,7 @@ storeError SuperBlockPage::unusedHead (OStorePageBIOS & rBIOS, PageData & rPageH /* * unusedPop(): pop freelist head (alloc page, step 2). */ -storeError SuperBlockPage::unusedPop (OStorePageBIOS & rBIOS, PageData const & rPageHead) +storeError SuperBlockPage::unusedPop (OStorePageBIOS const & rBIOS, PageData const & rPageHead) { sal_uInt32 const nAddr = rPageHead.m_aUnused.location(); OSL_PRECOND(nAddr != STORE_PAGE_NULL, "store::SuperBlock::unusedPop(): page not free"); @@ -290,7 +290,7 @@ storeError SuperBlockPage::unusedPop (OStorePageBIOS & rBIOS, PageData const & r /* * unusedPush(): push new freelist head. */ -storeError SuperBlockPage::unusedPush (OStorePageBIOS & rBIOS, sal_uInt32 nAddr) +storeError SuperBlockPage::unusedPush (OStorePageBIOS const & rBIOS, sal_uInt32 nAddr) { storeError eErrCode = verify (rBIOS); if (eErrCode != store_E_None) @@ -320,7 +320,7 @@ storeError SuperBlockPage::unusedPush (OStorePageBIOS & rBIOS, sal_uInt32 nAddr) /* * verify (with repair). */ -storeError SuperBlockPage::verify (OStorePageBIOS & rBIOS) +storeError SuperBlockPage::verify (OStorePageBIOS const & rBIOS) { // Verify 1st copy. storeError eErrCode = m_aSuperOne.verify(); diff --git a/store/source/store.cxx b/store/source/store.cxx index e967bb0f0c3b..558d8ff0eae0 100644 --- a/store/source/store.cxx +++ b/store/source/store.cxx @@ -210,8 +210,8 @@ storeError SAL_CALL store_flushFile ( */ storeError SAL_CALL store_openDirectory ( storeFileHandle hFile, - rtl_uString *pPath, - rtl_uString *pName, + rtl_uString const *pPath, + rtl_uString const *pName, storeAccessMode eAccessMode, storeDirectoryHandle *phDirectory ) SAL_THROW_EXTERN_C() @@ -304,8 +304,8 @@ storeError SAL_CALL store_findNext ( */ storeError SAL_CALL store_openStream ( storeFileHandle hFile, - rtl_uString *pPath, - rtl_uString *pName, + rtl_uString const *pPath, + rtl_uString const *pName, storeAccessMode eAccessMode, storeStreamHandle *phStream ) SAL_THROW_EXTERN_C() @@ -388,8 +388,8 @@ storeError SAL_CALL store_writeStream ( */ storeError SAL_CALL store_remove ( storeFileHandle Handle, - rtl_uString *pPath, - rtl_uString *pName + rtl_uString const *pPath, + rtl_uString const *pName ) SAL_THROW_EXTERN_C() { storeError eErrCode = store_E_None; -- cgit