Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion containers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ packToken TokenList::default_constructor(TokenMap scope) {

packToken* TokenList::ListIterator::next() {
if (i < list->size()) {
return &list->at(i++);
TokenList_t::size_type idx = TokenList_t::size_type(i++);
return &list->at(idx);
} else {
i = 0;
return NULL;
Expand Down
3 changes: 2 additions & 1 deletion containers.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ struct TokenList : public Container<TokenList_t>, public Iterable {
if (list().size() <= idx) {
throw std::out_of_range("List index out of range!");
}
return list()[idx];
TokenList_t::size_type i = TokenList_t::size_type(idx);
return list()[i];
}

void push(packToken val) const { list().push_back(val); }
Expand Down