diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-11 16:27:47 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-11 16:30:29 +0200 |
commit | 9a521e3d1f47044f157c59f215ee5b4e5b385365 (patch) | |
tree | 7d75a96c14a70ab67e7f6f4bc4af1dc10f9e28d4 /store | |
parent | 683cb8b9bd5dddfef6b64753bcaffd7d38d61a35 (diff) |
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
Diffstat (limited to 'store')
-rw-r--r-- | store/source/storbase.hxx | 6 | ||||
-rw-r--r-- | store/source/stordata.hxx | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx index 83dd44888219..2eed63736500 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 a8b131778778..82b7d68b5029 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; + } }; /*======================================================================== |