Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
perf(contentdialog): Delete redundant conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Diadlo committed Apr 20, 2016
1 parent 2143e21 commit 904a1d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/widget/contentdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,15 @@ 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"))
{
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();
}
}
Expand Down

0 comments on commit 904a1d4

Please sign in to comment.