diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-01 15:51:24 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-04 12:03:50 +0000 |
commit | 17b1852133427e6c0b4266ccb63e24980aff94f0 (patch) | |
tree | 68d8c881fd851df8f7ebc964c6e34cc9d3faa6ad /unotools/source | |
parent | ecdf7aaede66c209fa5c101c0435322a765f02ee (diff) |
loplugin:constantparam in unotools
Change-Id: I0501e6e7eadd735b1666a8ecb2c5e6da73ce7e67
Reviewed-on: https://gerrit.libreoffice.org/23728
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unotools/source')
-rw-r--r-- | unotools/source/config/configvaluecontainer.cxx | 8 | ||||
-rw-r--r-- | unotools/source/misc/atom.cxx | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/unotools/source/config/configvaluecontainer.cxx b/unotools/source/config/configvaluecontainer.cxx index 7880722fb3d1..a13b52a80fbd 100644 --- a/unotools/source/config/configvaluecontainer.cxx +++ b/unotools/source/config/configvaluecontainer.cxx @@ -215,7 +215,7 @@ namespace utl const sal_Char* _pConfigLocation, const sal_Int32 _nLevels ) :m_pImpl( new OConfigurationValueContainerImpl( _rxORB, _rAccessSafety ) ) { - implConstruct( OUString::createFromAscii( _pConfigLocation ), CVCFlags::UPDATE_ACCESS, _nLevels ); + implConstruct( OUString::createFromAscii( _pConfigLocation ), _nLevels ); } OConfigurationValueContainer::~OConfigurationValueContainer() @@ -224,7 +224,7 @@ namespace utl } void OConfigurationValueContainer::implConstruct( const OUString& _rConfigLocation, - const CVCFlags _nAccessFlags, const sal_Int32 _nLevels ) + const sal_Int32 _nLevels ) { SAL_WARN_IF(m_pImpl->aConfigRoot.isValid(), "unotools.config", "OConfigurationValueContainer::implConstruct: already initialized!"); @@ -232,9 +232,7 @@ namespace utl m_pImpl->aConfigRoot = OConfigurationTreeRoot::createWithComponentContext( m_pImpl->xORB, _rConfigLocation, - _nLevels, - ( _nAccessFlags & CVCFlags::UPDATE_ACCESS ) ? OConfigurationTreeRoot::CM_UPDATABLE : OConfigurationTreeRoot::CM_READONLY, - !bool( _nAccessFlags & CVCFlags::IMMEDIATE_UPDATE ) + _nLevels ); SAL_WARN_IF(!m_pImpl->aConfigRoot.isValid(), "unotools.config", "Could not access the configuration node located at " << _rConfigLocation); diff --git a/unotools/source/misc/atom.cxx b/unotools/source/misc/atom.cxx index 3ea665037357..84c2de04bbf5 100644 --- a/unotools/source/misc/atom.cxx +++ b/unotools/source/misc/atom.cxx @@ -32,13 +32,11 @@ AtomProvider::~AtomProvider() { } -int AtomProvider::getAtom( const OUString& rString, bool bCreate ) +int AtomProvider::getAtom( const OUString& rString ) { std::unordered_map< OUString, int, OUStringHash >::iterator it = m_aAtomMap.find( rString ); if( it != m_aAtomMap.end() ) return it->second; - if( ! bCreate ) - return INVALID_ATOM; m_aAtomMap[ rString ] = m_nAtoms; m_aStringMap[ m_nAtoms ] = rString; m_nAtoms++; @@ -68,11 +66,11 @@ int MultiAtomProvider::getAtom( int atomClass, const OUString& rString ) std::unordered_map<int, AtomProvider*>::iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) - return it->second->getAtom( rString, true/*bCreate*/ ); + return it->second->getAtom( rString ); AtomProvider* pNewClass; m_aAtomLists[ atomClass ] = pNewClass = new AtomProvider(); - return pNewClass->getAtom( rString, true/*bCreate*/ ); + return pNewClass->getAtom( rString ); } const OUString& MultiAtomProvider::getString( int atomClass, int atom ) const |