mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 21:47:37 +03:00
Implement IndexedList::iterator
It is dangerous to expose internal iterator to the outside, which is easily misused.
This commit is contained in:
parent
421ae13d40
commit
d4ba562710
11 changed files with 583 additions and 133 deletions
|
@ -122,10 +122,9 @@ SharedHandle<RequestGroup> getReservedGroup
|
|||
(const SharedHandle<RequestGroupMan>& rgman, size_t index)
|
||||
{
|
||||
assert(rgman->getReservedGroups().size() > index);
|
||||
RequestGroupList::SeqType::const_iterator i =
|
||||
rgman->getReservedGroups().begin();
|
||||
RequestGroupList::const_iterator i = rgman->getReservedGroups().begin();
|
||||
std::advance(i, index);
|
||||
return (*i).second;
|
||||
return *i;
|
||||
}
|
||||
|
||||
SharedHandle<RequestGroup> createRequestGroup(int32_t pieceLength,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue