summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-10 20:47:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-11 11:20:43 +0200
commit2d582244680e7f6dec6e4a466e276f93ccb01dc9 (patch)
treeb0e880ddfb3ce1ea2f47151b648e7fbb55132f08 /svl
parent74012c48d99634a7556a86f77e9522024f2afdb2 (diff)
loplugin:flatten
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index fe90321e6398..51fb129cddb1 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -926,23 +926,23 @@ void SAL_CALL PasswordContainer::removePersistent( const OUString& aURL, const O
auto aNPIter = std::find_if(aIter->second.begin(), aIter->second.end(),
[&aName](const NamePassRecord& rNPRecord) { return rNPRecord.GetUserName() == aName; });
- if (aNPIter != aIter->second.end())
+ if (aNPIter == aIter->second.end())
+ return;
+
+ if( aNPIter->HasPasswords( PERSISTENT_RECORD ) )
{
- if( aNPIter->HasPasswords( PERSISTENT_RECORD ) )
- {
- // TODO/LATER: should the password be converted to MemoryPassword?
- aNPIter->RemovePasswords( PERSISTENT_RECORD );
+ // TODO/LATER: should the password be converted to MemoryPassword?
+ aNPIter->RemovePasswords( PERSISTENT_RECORD );
- if ( m_pStorageFile )
- m_pStorageFile->remove( aURL, aName ); // remove record ( aURL, aName )
- }
+ if ( m_pStorageFile )
+ m_pStorageFile->remove( aURL, aName ); // remove record ( aURL, aName )
+ }
- if( !aNPIter->HasPasswords( MEMORY_RECORD ) )
- aIter->second.erase( aNPIter );
+ if( !aNPIter->HasPasswords( MEMORY_RECORD ) )
+ aIter->second.erase( aNPIter );
- if( aIter->second.empty() )
- m_aContainer.erase( aIter );
- }
+ if( aIter->second.empty() )
+ m_aContainer.erase( aIter );
}
void SAL_CALL PasswordContainer::removeAllPersistent()