Use map to make DownloadResult lookup fast

This commit is contained in:
Tatsuhiro Tsujikawa 2012-12-16 18:50:45 +09:00
parent 0001f4cfbd
commit 0a4ce4fdb5
3 changed files with 32 additions and 6 deletions

View file

@ -37,6 +37,7 @@ SharedHandle<DownloadResult> createDownloadResult
std::vector<SharedHandle<FileEntry> > entries;
entries.push_back(entry);
SharedHandle<DownloadResult> dr(new DownloadResult());
dr->gid = GroupId::create();
dr->fileEntries = entries;
dr->result = result;
dr->belongsTo = 0;