1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 14:57:52 +00:00

Code clean up

This commit is contained in:
Christophe Dumez 2011-01-13 20:57:10 +00:00
parent eb0053fe48
commit 22c785b951

View File

@ -2593,14 +2593,12 @@ entry QBtSession::generateFilePriorityResumeData(boost::intrusive_ptr<torrent_in
rd["info-hash"] = std::string((char*)info_hash.begin(), (char*)info_hash.end());
// Priorities
entry::list_type priorities;
priorities.resize(fp.size());
for(uint i=0; i<fp.size(); ++i) {
priorities.push_back(entry(fp[i]));
}
rd["file_priority"] = entry(priorities);
// files sizes (useless but required)
entry::list_type sizes;
sizes.resize(t->num_files());
for(int i=0; i<t->num_files(); ++i) {
entry::list_type p;
p.push_back(entry(0));
@ -2610,7 +2608,6 @@ entry QBtSession::generateFilePriorityResumeData(boost::intrusive_ptr<torrent_in
rd["file sizes"] = entry(sizes);
// Slots
entry::list_type tslots;
for(int i=0; i<t->num_pieces(); ++i) {
tslots.push_back(-1);
}