1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

perf(contentdialog): Delete redundant conditions

This commit is contained in:
Polshakov Dmitry 2016-04-19 15:09:00 +03:00 committed by Diadlo
parent 2143e21e89
commit 904a1d4909
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727

View File

@ -518,7 +518,7 @@ void ContentDialog::dragEnterEvent(QDragEnterEvent *event)
auto iter = friendList.find(friendId);
// If friend is already in a dialog then you can't drop friend where it already is.
if (iter == friendList.end() || (iter != friendList.end() && std::get<0>(iter.value()) != this))
if (iter == friendList.end() || std::get<0>(iter.value()) != this)
event->acceptProposedAction();
}
else if (event->mimeData()->hasFormat("group"))
@ -526,7 +526,7 @@ void ContentDialog::dragEnterEvent(QDragEnterEvent *event)
int groupId = event->mimeData()->data("group").toInt();
auto iter = groupList.find(groupId);
if (iter == groupList.end() || (iter != groupList.end() && std::get<0>(iter.value()) != this))
if (iter == groupList.end() || std::get<0>(iter.value()) != this)
event->acceptProposedAction();
}
}