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:
csoler 2015-04-17 21:36:22 +00:00
parent f1309a8cbe
commit c9d5c7b3cb
51 changed files with 269 additions and 266 deletions

View file

@ -562,7 +562,7 @@ bool ConnectFriendWizard::validateCurrentPage()
break;
case Page_FriendRecommendations:
{
std::list<RsPeerId> recommendIds;
std::set<RsPeerId> recommendIds;
ui->frec_recommendList->selectedIds<RsPeerId,FriendSelectionWidget::IDTYPE_SSL>(recommendIds, false);
if (recommendIds.empty()) {
@ -570,7 +570,7 @@ bool ConnectFriendWizard::validateCurrentPage()
return false;
}
std::list<RsPeerId> toIds;
std::set<RsPeerId> toIds;
ui->frec_toList->selectedIds<RsPeerId,FriendSelectionWidget::IDTYPE_SSL>(toIds, false);
if (toIds.empty()) {
@ -578,7 +578,7 @@ bool ConnectFriendWizard::validateCurrentPage()
return false;
}
std::list<RsPeerId>::iterator toId;
std::set<RsPeerId>::iterator toId;
for (toId = toIds.begin(); toId != toIds.end(); ++toId) {
MessageComposer::recommendFriend(recommendIds, *toId, ui->frec_messageEdit->toHtml(), true);
}