Use static_cast for explicit type conversions

This commit is contained in:
sledgehammer999 2020-04-18 15:51:38 +03:00
parent d69ce4f1cf
commit a17b1f2b78
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
4 changed files with 11 additions and 11 deletions

View file

@ -2599,7 +2599,7 @@ void Session::saveTorrentsQueue()
QMap<int, QString> queue; // Use QMap since it should be ordered by key
for (const TorrentHandleImpl *torrent : asConst(m_torrents)) {
// We require actual (non-cached) queue position here!
const int queuePos = LTUnderlyingType<LTQueuePosition> {torrent->nativeHandle().queue_position()};
const int queuePos = static_cast<LTUnderlyingType<LTQueuePosition>>(torrent->nativeHandle().queue_position());
if (queuePos >= 0)
queue[queuePos] = torrent->hash();
}