diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-25 15:37:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-27 10:51:08 +0200 |
commit | c4a9241f72e3b7bf84eaadc51dbaa2accc7b920c (patch) | |
tree | c3037d10c40adf45ea32138783c476fce2459abd /comphelper | |
parent | 17551216cc6843e8dcdf84bd8f9735d1c7fb145c (diff) |
new clang plugin: staticmethods
Genius suggestion from Tor Lillqvist, write a clang plugin that finds
methods that can be static.
Change-Id: Ie6684cc95d088e8750b300a028b49f763da00345
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/componentbase.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/property/MasterPropertySet.cxx | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/comphelper/source/misc/componentbase.cxx b/comphelper/source/misc/componentbase.cxx index aa23f9d5fda2..7b0b8201e490 100644 --- a/comphelper/source/misc/componentbase.cxx +++ b/comphelper/source/misc/componentbase.cxx @@ -51,7 +51,7 @@ namespace comphelper } - Reference< XInterface > ComponentBase::getComponent() const + Reference< XInterface > ComponentBase::getComponent() { return NULL; } diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index 8c5a220a0bec..f5e9cba48387 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -370,9 +370,13 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const OUString& Prop if (pSlave->mpMutex) xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpMutex) ); - pSlave->_preGetPropertyState(); - pSlave->_getPropertyState( *((*aIter).second->mpInfo), aState ); - pSlave->_postGetPropertyState(); + // FIXME: Each of these three methods does OSL_FAIL( "you have + // to implement this yourself!") and nothing else, so this + // can't make much sense. Is this whole else branch in fact + // dead code? + ChainablePropertySet::_preGetPropertyState(); + ChainablePropertySet::_getPropertyState( *((*aIter).second->mpInfo), aState ); + ChainablePropertySet::_postGetPropertyState(); } return aState; @@ -404,10 +408,10 @@ Sequence< PropertyState > SAL_CALL MasterPropertySet::getPropertyStates( const S SlaveData * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]; if (!pSlave->IsInit()) { - pSlave->mpSlave->_preGetPropertyState(); + comphelper::ChainablePropertySet::_preGetPropertyState(); pSlave->SetInit ( true ); } - pSlave->mpSlave->_getPropertyState( *((*aIter).second->mpInfo), *pState ); + comphelper::ChainablePropertySet::_getPropertyState( *((*aIter).second->mpInfo), *pState ); } } _postGetPropertyState(); @@ -416,7 +420,7 @@ Sequence< PropertyState > SAL_CALL MasterPropertySet::getPropertyStates( const S { if ( (*aSlaveIter).second->IsInit()) { - (*aSlaveIter).second->mpSlave->_postGetPropertyState(); + comphelper::ChainablePropertySet::_postGetPropertyState(); (*aSlaveIter).second->SetInit ( false ); } ++aSlaveIter; |