Kaydet (Commit) e51cc9eb authored tarafından Stephan Bergmann's avatar Stephan Bergmann

More loplugin:simplifybool

...found with GCC 9, where the standard library iterator implementations are
apparently sufficiently different to older versions of GCC to find more cases
of !(... == ...) vs. ... != ...

Change-Id: Ibe7c5140049a69d2c5318b4b2371f2e66bd05028
Reviewed-on: https://gerrit.libreoffice.org/68012
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 0a35b680
......@@ -2137,7 +2137,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_release(
{
MutexGuard aGuard( rInit.getMutex() );
WeakMap_Impl::iterator aIt = rInit.pWeakMap->find( pRef->pTypeName->buffer );
if( !(aIt == rInit.pWeakMap->end()) && (*aIt).second == pRef )
if( aIt != rInit.pWeakMap->end() && (*aIt).second == pRef )
{
// remove only if it contains the same object
rInit.pWeakMap->erase( aIt );
......
......@@ -2289,7 +2289,7 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
OSL_FAIL( "error: !mCreateOjectsCurrentMasterPage.is()" );
return;
}
bool bHasCharSetMap = !( mTextFieldCharSets.find( mCreateOjectsCurrentMasterPage ) == mTextFieldCharSets.end() );
bool bHasCharSetMap = mTextFieldCharSets.find( mCreateOjectsCurrentMasterPage ) != mTextFieldCharSets.end();
static const OUString aHeaderId( NSPREFIX "header-field" );
static const OUString aFooterId( aOOOAttrFooterField );
......
......@@ -157,7 +157,7 @@ OUString StringResourceImpl::implResolveString
if( pLocaleItem != nullptr && loadLocale( pLocaleItem ) )
{
IdToStringMap::iterator it = pLocaleItem->m_aIdToStringMap.find( ResourceID );
if( !( it == pLocaleItem->m_aIdToStringMap.end() ) )
if( it != pLocaleItem->m_aIdToStringMap.end() )
{
aRetStr = (*it).second;
bSuccess = true;
......@@ -189,7 +189,7 @@ bool StringResourceImpl::implHasEntryForId( const OUString& ResourceID, LocaleIt
if( pLocaleItem != nullptr && loadLocale( pLocaleItem ) )
{
IdToStringMap::iterator it = pLocaleItem->m_aIdToStringMap.find( ResourceID );
if( !( it == pLocaleItem->m_aIdToStringMap.end() ) )
if( it != pLocaleItem->m_aIdToStringMap.end() )
bSuccess = true;
}
return bSuccess;
......@@ -2039,7 +2039,7 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem const *
{
OUString aResourceID = *pStr;
IdToStringMap::const_iterator it = rHashMap.find( aResourceID );
if( !( it == rHashMap.end() ) )
if( it != rHashMap.end() )
{
implWriteStringWithEncoding( aResourceID, xTextOutputStream, true );
xTextOutputStream->writeString( "=" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment