Performance improvement on ARM

This commit is contained in:
Christophe Dumez
2011-01-25 17:07:15 +00:00
parent 895d5151e1
commit 2a44ec9b91
23 changed files with 52 additions and 51 deletions

View File

@@ -88,12 +88,12 @@ qlonglong QTorrentHandle::next_announce_s() const {
return torrent_handle::status().next_announce.total_seconds();
}
float QTorrentHandle::progress() const {
qreal QTorrentHandle::progress() const {
if(!torrent_handle::status().total_wanted)
return 0.;
if (torrent_handle::status().total_wanted_done == torrent_handle::status().total_wanted)
return 1.;
float progress = (float)torrent_handle::status().total_wanted_done/(float)torrent_handle::status().total_wanted;
qreal progress = (float)torrent_handle::status().total_wanted_done/(float)torrent_handle::status().total_wanted;
Q_ASSERT(progress >= 0. && progress <= 1.);
return progress;
}
@@ -159,11 +159,11 @@ size_type QTorrentHandle::total_wanted() const {
return torrent_handle::status().total_wanted;
}
float QTorrentHandle::download_payload_rate() const {
qreal QTorrentHandle::download_payload_rate() const {
return torrent_handle::status().download_payload_rate;
}
float QTorrentHandle::upload_payload_rate() const {
qreal QTorrentHandle::upload_payload_rate() const {
return torrent_handle::status().upload_payload_rate;
}