store/source/storbase.hxx | 6 ++++-- store/source/stordata.hxx | 10 ++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-)
New commits: commit 9a521e3d1f47044f157c59f215ee5b4e5b385365 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon May 11 16:27:47 2015 +0200 Add back functionality erroneously removed ...with 09d5b31ebe187a4cd9f3efca5a7cb7f87e1e19f6 "loplugin:constantfunction: store," which apparently over-eagerly reduced functionality that happened to be constant in one specific implicit instantiation of a template, but not in others. (Plus, adapting the original code to silence false loplugin:staticmethods warnings.) Change-Id: I156df3aef1b3b0c9d36b2a54c57de29948749bde diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx index 83dd448..2eed637 100644 --- a/store/source/storbase.hxx +++ b/store/source/storbase.hxx @@ -751,7 +751,9 @@ public: return store_E_InvalidAccess; pHead->guard(nAddr); - OSL_PRECOND(dynamic_page_cast<T>(pHead) != 0, "store::PageHolder<T>::guard(): Null pointer"); + T * pImpl = dynamic_page_cast<T>(pHead); + OSL_PRECOND(pImpl != 0, "store::PageHolder<T>::guard(): Null pointer"); + pImpl->guard(); return store_E_None; } @@ -769,7 +771,7 @@ public: if (!pImpl) return store_E_WrongVersion; - return store_E_None; + return pImpl->verify(); } }; diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx index a8b1317..82b7d68 100644 --- a/store/source/stordata.hxx +++ b/store/source/stordata.hxx @@ -87,6 +87,16 @@ struct OStoreDataPageData : public store::OStorePageData if (capacity()) memset (m_pData, 0, capacity()); } + /** guard (external representation). + */ + void guard() { (void) this; /* loplugin:staticmethods */ } + + /** verify (external representation). + */ + storeError verify() const { + (void) this; // loplugin:staticmethods + return store_E_None; + } }; /*======================================================================== _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits