mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Use static_cast for explicit type conversions
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user