Use underlying_type member directly

`LTUnderlyingType` served as a intermediate type for libtorrent 1.1 and
1.2 and is obsoleted now.
Also add helper to convert to underlying type.
This commit is contained in:
Chocobo1
2021-07-05 15:19:17 +08:00
parent 9bfc74a1bc
commit 7c23d800e6
4 changed files with 21 additions and 44 deletions

View File

@@ -188,7 +188,7 @@ void TorrentCreatorThread::run()
, [this, &newTorrent](const lt::piece_index_t n)
{
checkInterruptionRequested();
sendProgressSignal(static_cast<LTUnderlyingType<lt::piece_index_t>>(n), newTorrent.num_pieces());
sendProgressSignal(toLTUnderlyingType(n), newTorrent.num_pieces());
});
// Set qBittorrent as creator and add user comment to