Replace C-style casts with C++ ones

This commit is contained in:
Eugene Shalygin
2017-05-29 14:10:31 +02:00
parent e3671050d1
commit 74cecb1b6c
20 changed files with 41 additions and 39 deletions

View File

@@ -555,7 +555,7 @@ qreal TorrentHandle::progress() const
if (m_nativeStatus.total_wanted_done == m_nativeStatus.total_wanted)
return 1.;
float progress = (float) m_nativeStatus.total_wanted_done / (float) m_nativeStatus.total_wanted;
float progress = static_cast<float>(m_nativeStatus.total_wanted_done) / m_nativeStatus.total_wanted;
Q_ASSERT((progress >= 0.f) && (progress <= 1.f));
return progress;
}