From 14d45665433eec974acd96f813f2bf314bdb3eba Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 19 Oct 2017 11:09:13 +0200 Subject: loplugin:constmethod in codemaker,registry,store Change-Id: Ie75875974f054ff79bd64b1c261e79e2b78eb7fc Reviewed-on: https://gerrit.libreoffice.org/43540 Tested-by: Jenkins Reviewed-by: Noel Grandin --- store/source/storbios.cxx | 8 ++++---- store/source/storbios.hxx | 8 ++++---- store/source/stordata.cxx | 8 ++++---- store/source/stordata.hxx | 10 +++++----- store/source/stortree.cxx | 4 ++-- store/source/stortree.hxx | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) (limited to 'store') diff --git a/store/source/storbios.cxx b/store/source/storbios.cxx index 12208b1c597a..bf343abd290e 100644 --- a/store/source/storbios.cxx +++ b/store/source/storbios.cxx @@ -688,7 +688,7 @@ void OStorePageBIOS::cleanup_Impl() * Low Level: Precond: initialized, exclusive access. */ storeError OStorePageBIOS::read ( - sal_uInt32 nAddr, void *pData, sal_uInt32 nSize) + sal_uInt32 nAddr, void *pData, sal_uInt32 nSize) const { // Check precond. if (!m_xLockBytes.is()) @@ -703,7 +703,7 @@ storeError OStorePageBIOS::read ( * Low Level: Precond: initialized, writeable, exclusive access. */ storeError OStorePageBIOS::write ( - sal_uInt32 nAddr, const void *pData, sal_uInt32 nSize) + sal_uInt32 nAddr, const void *pData, sal_uInt32 nSize) const { // Check precond. if (!m_xLockBytes.is()) @@ -874,7 +874,7 @@ storeError OStorePageBIOS::loadObjectAt (OStorePageObject & rPage, sal_uInt32 nA * loadObjectAt_Impl. * Internal: Precond: initialized, readable, exclusive access. */ -storeError OStorePageBIOS::loadObjectAt_Impl (OStorePageObject & rPage, sal_uInt32 nAddr) +storeError OStorePageBIOS::loadObjectAt_Impl (OStorePageObject & rPage, sal_uInt32 nAddr) const { storeError eErrCode = m_xCache->lookupPageAt (rPage.get(), nAddr); if (eErrCode != store_E_NotExists) @@ -920,7 +920,7 @@ storeError OStorePageBIOS::saveObjectAt (OStorePageObject & rPage, sal_uInt32 nA * saveObjectAt_Impl. * Internal: Precond: initialized, writeable, exclusive access. */ -storeError OStorePageBIOS::saveObjectAt_Impl (OStorePageObject & rPage, sal_uInt32 nAddr) +storeError OStorePageBIOS::saveObjectAt_Impl (OStorePageObject & rPage, sal_uInt32 nAddr) const { // Guard page (incl. set location). storeError eErrCode = rPage.guard (nAddr); diff --git a/store/source/storbios.hxx b/store/source/storbios.hxx index 997cfbc9471b..f223b4d0d258 100644 --- a/store/source/storbios.hxx +++ b/store/source/storbios.hxx @@ -65,12 +65,12 @@ public: /** read. */ storeError read ( - sal_uInt32 nAddr, void *pData, sal_uInt32 nSize); + sal_uInt32 nAddr, void *pData, sal_uInt32 nSize) const; /** write. */ storeError write ( - sal_uInt32 nAddr, const void *pData, sal_uInt32 nSize); + sal_uInt32 nAddr, const void *pData, sal_uInt32 nSize) const; /** isWriteable. */ @@ -163,9 +163,9 @@ private: /** Page Maintenance. */ storeError loadObjectAt_Impl ( - OStorePageObject & rPage, sal_uInt32 nAddr); + OStorePageObject & rPage, sal_uInt32 nAddr) const; storeError saveObjectAt_Impl ( - OStorePageObject & rPage, sal_uInt32 nAddr); + OStorePageObject & rPage, sal_uInt32 nAddr) const; OStorePageBIOS (const OStorePageBIOS&) = delete; OStorePageBIOS& operator= (const OStorePageBIOS&) = delete; diff --git a/store/source/stordata.cxx b/store/source/stordata.cxx index a2c992b983d6..1127674f8097 100644 --- a/store/source/stordata.cxx +++ b/store/source/stordata.cxx @@ -211,7 +211,7 @@ storeError OStoreIndirectionPageObject::verify (sal_uInt32 nAddr) const storeError OStoreIndirectionPageObject::read ( sal_uInt16 nSingle, OStoreDataPageObject &rData, - OStorePageBIOS &rBIOS) + OStorePageBIOS &rBIOS) const { PageHolderObject< page > xImpl (m_xPage); page const & rPage = (*xImpl); @@ -237,7 +237,7 @@ storeError OStoreIndirectionPageObject::read ( sal_uInt16 nDouble, sal_uInt16 nSingle, OStoreDataPageObject &rData, - OStorePageBIOS &rBIOS) + OStorePageBIOS &rBIOS) const { PageHolderObject< page > xImpl (m_xPage); page const & rPage = (*xImpl); @@ -270,7 +270,7 @@ storeError OStoreIndirectionPageObject::read ( sal_uInt16 nDouble, sal_uInt16 nSingle, OStoreDataPageObject &rData, - OStorePageBIOS &rBIOS) + OStorePageBIOS &rBIOS) const { PageHolderObject< page > xImpl (m_xPage); page const & rPage = (*xImpl); @@ -723,7 +723,7 @@ OStoreDirectoryPageObject::scope ( storeError OStoreDirectoryPageObject::read ( sal_uInt32 nPage, OStoreDataPageObject &rData, - OStorePageBIOS &rBIOS) + OStorePageBIOS &rBIOS) const { // Determine scope and link indices. page::DataBlock::LinkDescriptor aLink; diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx index c8f1597f551a..5014971da3da 100644 --- a/store/source/stordata.hxx +++ b/store/source/stordata.hxx @@ -80,7 +80,7 @@ struct OStoreDataPageData : public store::PageData /** guard (external representation). */ - void guard() { (void) this; /* loplugin:staticmethods */ } + void guard() const { (void) this; /* loplugin:staticmethods */ } /** verify (external representation). */ @@ -216,20 +216,20 @@ public: storeError read ( sal_uInt16 nSingle, OStoreDataPageObject &rData, - OStorePageBIOS &rBIOS); + OStorePageBIOS &rBIOS) const; storeError read ( sal_uInt16 nDouble, sal_uInt16 nSingle, OStoreDataPageObject &rData, - OStorePageBIOS &rBIOS); + OStorePageBIOS &rBIOS) const; storeError read ( sal_uInt16 nTriple, sal_uInt16 nDouble, sal_uInt16 nSingle, OStoreDataPageObject &rData, - OStorePageBIOS &rBIOS); + OStorePageBIOS &rBIOS) const; /** write (indirect data page). */ @@ -707,7 +707,7 @@ public: storeError read ( sal_uInt32 nPage, OStoreDataPageObject &rData, - OStorePageBIOS &rBIOS); + OStorePageBIOS &rBIOS) const; /** write (external data page). */ diff --git a/store/source/stortree.cxx b/store/source/stortree.cxx index 30264e0917b6..624945914f75 100644 --- a/store/source/stortree.cxx +++ b/store/source/stortree.cxx @@ -301,7 +301,7 @@ storeError OStoreBTreeNodeObject::remove ( * testInvariant. * Precond: root node page loaded. */ -void OStoreBTreeRootObject::testInvariant (char const * message) +void OStoreBTreeRootObject::testInvariant (char const * message) const { OSL_PRECOND(m_xPage.get() != nullptr, "OStoreBTreeRootObject::testInvariant(): Null pointer"); SAL_WARN_IF( (m_xPage->location() - m_xPage->size()) != 0, "store", message); @@ -380,7 +380,7 @@ storeError OStoreBTreeRootObject::find_lookup ( OStoreBTreeNodeObject & rNode, // [out] sal_uInt16 & rIndex, // [out] OStorePageKey const & rKey, - OStorePageBIOS & rBIOS) + OStorePageBIOS & rBIOS) const { // Init node w/ root page. testInvariant("OStoreBTreeRootObject::find_lookup(): enter"); diff --git a/store/source/stortree.hxx b/store/source/stortree.hxx index 872ff0821432..f70aad057f9f 100644 --- a/store/source/stortree.hxx +++ b/store/source/stortree.hxx @@ -256,7 +256,7 @@ public: OStoreBTreeNodeObject & rNode, // [out] sal_uInt16 & rIndex, // [out] OStorePageKey const & rKey, - OStorePageBIOS & rBIOS); + OStorePageBIOS & rBIOS) const; /** find_insert (possibly with split()). * Precond: root node page loaded. @@ -271,7 +271,7 @@ private: /** testInvariant. * Precond: root node page loaded. */ - void testInvariant (char const * message); + void testInvariant (char const * message) const; /** change (Root). * -- cgit