mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
Use static_cast for explicit type conversions
This commit is contained in:
parent
d69ce4f1cf
commit
a17b1f2b78
4 changed files with 11 additions and 11 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue