Suppress C4267 conversion warnings (#13307)

- warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data

Caused by mismatch between size_type of std and Qt containers. It is safe to cast to int as all of those containers hold low number of objects.
This commit is contained in:
Kacper Michajłow 2021-06-11 07:51:06 +02:00 committed by GitHub
parent 6c66d02aff
commit ccb59fbad3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 22 deletions

View file

@ -4830,7 +4830,7 @@ void Session::handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert
void Session::handleStateUpdateAlert(const lt::state_update_alert *p)
{
QVector<Torrent *> updatedTorrents;
updatedTorrents.reserve(p->status.size());
updatedTorrents.reserve(static_cast<decltype(updatedTorrents)::size_type>(p->status.size()));
for (const lt::torrent_status &status : p->status)
{