Changed iterator logic to capture header list by reference

This commit is contained in:
accelerated
2018-12-06 10:37:02 -05:00
parent 1c80af9b68
commit 25c2eaa998
2 changed files with 5 additions and 8 deletions

View File

@@ -306,15 +306,13 @@ bool HeaderList<HeaderType>::empty() const {
template <typename HeaderType>
typename HeaderList<HeaderType>::Iterator
HeaderList<HeaderType>::begin() const {
return empty() ? Iterator(HeaderList<HeaderType>(), 0) :
Iterator(make_non_owning(handle_.get()), 0);
return Iterator(*this, 0);
}
template <typename HeaderType>
typename HeaderList<HeaderType>::Iterator
HeaderList<HeaderType>::end() const {
return empty() ? Iterator(HeaderList<HeaderType>(), size()) :
Iterator(make_non_owning(handle_.get()), size());
return Iterator(*this, size());
}
template <typename HeaderType>