Fix unchecked dynamic_cast

Replace some unnecessary (and slow) dynamic_cast with static_cast.
This commit is contained in:
Vladimir Golovnev (Glassez) 2016-01-15 11:32:16 +03:00
parent a203246e85
commit a35cbdc4a9
2 changed files with 7 additions and 4 deletions

View file

@ -191,7 +191,7 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
bool TransferListSortModel::lowerPositionThan(const QModelIndex &left, const QModelIndex &right) const
{
const TorrentModel *model = dynamic_cast<TorrentModel*>(sourceModel());
const TorrentModel *model = static_cast<TorrentModel*>(sourceModel());
// Sort according to TR_PRIORITY
const int queueL = model->data(model->index(left.row(), TorrentModel::TR_PRIORITY)).toInt();