mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
turned some std::list<PeerId> into std::set, as it automatically prevents duplicates
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8138 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f1309a8cbe
commit
c9d5c7b3cb
51 changed files with 269 additions and 266 deletions
|
@ -1867,7 +1867,7 @@ void PGPHandler::locked_mergeKeyringFromDisk( ops_keyring_t *keyring,
|
|||
ops_keyring_free(tmp_keyring) ;
|
||||
}
|
||||
|
||||
bool PGPHandler::removeKeysFromPGPKeyring(const std::list<RsPgpId>& keys_to_remove,std::string& backup_file,uint32_t& error_code)
|
||||
bool PGPHandler::removeKeysFromPGPKeyring(const std::set<RsPgpId>& keys_to_remove,std::string& backup_file,uint32_t& error_code)
|
||||
{
|
||||
// 1 - lock everything.
|
||||
//
|
||||
|
@ -1876,7 +1876,7 @@ bool PGPHandler::removeKeysFromPGPKeyring(const std::list<RsPgpId>& keys_to_remo
|
|||
|
||||
error_code = PGP_KEYRING_REMOVAL_ERROR_NO_ERROR ;
|
||||
|
||||
for(std::list<RsPgpId>::const_iterator it(keys_to_remove.begin());it!=keys_to_remove.end();++it)
|
||||
for(std::set<RsPgpId>::const_iterator it(keys_to_remove.begin());it!=keys_to_remove.end();++it)
|
||||
if(locked_getSecretKey(*it) != NULL)
|
||||
{
|
||||
std::cerr << "(EE) PGPHandler:: can't remove key " << (*it).toStdString() << " since its shared by a secret key! Operation cancelled." << std::endl;
|
||||
|
@ -1912,7 +1912,7 @@ bool PGPHandler::removeKeysFromPGPKeyring(const std::list<RsPgpId>& keys_to_remo
|
|||
|
||||
// Remove keys from the keyring, and update the keyring map.
|
||||
//
|
||||
for(std::list<RsPgpId>::const_iterator it(keys_to_remove.begin());it!=keys_to_remove.end();++it)
|
||||
for(std::set<RsPgpId>::const_iterator it(keys_to_remove.begin());it!=keys_to_remove.end();++it)
|
||||
{
|
||||
if(locked_getSecretKey(*it) != NULL)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue