diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-20 09:26:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-20 11:54:20 +0200 |
commit | 8ed77fae3e5e9e5f7409e03d5e4586f428a65c86 (patch) | |
tree | e4dea7abf2deced1aeb88eb8b570a75271cb9150 /comphelper/source/property | |
parent | 4d7054947d87174decf12ad204c09532f33599f8 (diff) |
loplugin:oncevar in codemaker..connectivity
Change-Id: Ia479d9d3d459a699dfc5c1148d01c35e8bc973bd
Reviewed-on: https://gerrit.libreoffice.org/39000
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper/source/property')
-rw-r--r-- | comphelper/source/property/ChainablePropertySet.cxx | 4 | ||||
-rw-r--r-- | comphelper/source/property/MasterPropertySet.cxx | 4 | ||||
-rw-r--r-- | comphelper/source/property/opropertybag.cxx | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx index c847b393030b..258b6dad0495 100644 --- a/comphelper/source/property/ChainablePropertySet.cxx +++ b/comphelper/source/property/ChainablePropertySet.cxx @@ -194,9 +194,7 @@ PropertyState SAL_CALL ChainablePropertySet::getPropertyState( const OUString& P if( aIter == mxInfo->maMap.end()) throw UnknownPropertyException( PropertyName, static_cast< XPropertySet* >( this ) ); - PropertyState aState(PropertyState_AMBIGUOUS_VALUE); - - return aState; + return PropertyState_AMBIGUOUS_VALUE; } Sequence< PropertyState > SAL_CALL ChainablePropertySet::getPropertyStates( const Sequence< OUString >& rPropertyNames ) diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index f4df2305e6c6..3f83b12b2be4 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -322,8 +322,6 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const OUString& Prop if( aIter == mxInfo->maMap.end()) throw UnknownPropertyException( PropertyName, static_cast< XPropertySet* >( this ) ); - PropertyState aState(PropertyState_AMBIGUOUS_VALUE); - // 0 means it's one of ours ! if ( (*aIter).second->mnMapId != 0 ) { @@ -335,7 +333,7 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const OUString& Prop xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpMutex) ); } - return aState; + return PropertyState_AMBIGUOUS_VALUE; } Sequence< PropertyState > SAL_CALL MasterPropertySet::getPropertyStates( const Sequence< OUString >& rPropertyNames ) diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index 4fbdb8bfe96e..e36507a599ed 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -478,7 +478,7 @@ namespace comphelper if ( m_bAutoAddProperties ) { // add the property - sal_Int16 nAttributes = PropertyAttribute::BOUND | PropertyAttribute::REMOVABLE | PropertyAttribute::MAYBEDEFAULT; + sal_Int16 const nAttributes = PropertyAttribute::BOUND | PropertyAttribute::REMOVABLE | PropertyAttribute::MAYBEDEFAULT; addProperty( *pName, nAttributes, pProperty->Value ); continue; } |