diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-03-23 01:34:37 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-03-23 01:34:37 +0900 |
| commit | eed804baaa02b4f81a27ba2844868b19992a90a1 (patch) | |
| tree | f6c5741443a979593fe080422ac78ef1b0f699d2 /src/StreamFileAllocationEntry.cc | |
| parent | 4acc0f88317287b86c6b89ba5e5262d3ebd30cc9 (diff) | |
Use std::set instead of std::deque if the elements are sorted and
insertions and deletions are frequent.
Diffstat (limited to 'src/StreamFileAllocationEntry.cc')
| -rw-r--r-- | src/StreamFileAllocationEntry.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StreamFileAllocationEntry.cc b/src/StreamFileAllocationEntry.cc index 3484e3e7..dd440a35 100644 --- a/src/StreamFileAllocationEntry.cc +++ b/src/StreamFileAllocationEntry.cc @@ -70,9 +70,9 @@ void StreamFileAllocationEntry::prepareForNextAction dctx->getFileEntries(); for(std::vector<SharedHandle<FileEntry> >::const_iterator i = fileEntries.begin(), eoi = fileEntries.end(); i != eoi; ++i) { - const std::deque<SharedHandle<Request> >& reqs = + const FileEntry::InFlightRequestSet& reqs = (*i)->getInFlightRequests(); - for(std::deque<SharedHandle<Request> >::const_iterator j = + for(FileEntry::InFlightRequestSet::iterator j = reqs.begin(), eoj = reqs.end(); j != eoj; ++j) { const SharedHandle<PeerStat>& peerStat = (*j)->getPeerStat(); if(peerStat) { |
