diff options
Diffstat (limited to 'src/DownloadContext.cc')
| -rw-r--r-- | src/DownloadContext.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/DownloadContext.cc b/src/DownloadContext.cc index 7bb307e7..7fba6d55 100644 --- a/src/DownloadContext.cc +++ b/src/DownloadContext.cc @@ -125,9 +125,11 @@ void DownloadContext::setFilePathWithIndex void DownloadContext::setFileFilter(SegList<int>& sgl) { + using namespace std::placeholders; + if(!sgl.hasNext() || fileEntries_.size() == 1) { std::for_each(fileEntries_.begin(), fileEntries_.end(), - std::bind2nd(mem_fun_sh(&FileEntry::setRequested), true)); + std::bind(&FileEntry::setRequested, _1, true)); return; } assert(sgl.peek() >= 1); |
