Skip to content

Commit

Permalink
cleanup: replace List_iterator(_fast) in handler0alter.cc
Browse files Browse the repository at this point in the history
Basically, use more List<T>::iterator. This patch required adding two more
overloads to new iterator for convenience.
  • Loading branch information
kevgs committed Nov 12, 2019
1 parent 83a0eae commit ae72205
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 147 deletions.
6 changes: 6 additions & 0 deletions sql/sql_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,12 @@ template <class T> class List :public base_list
}

T &operator*() { return *static_cast<T *>(node->info); }
T *operator->() { return static_cast<T *>(node->info); }

bool operator==(const typename List<T>::iterator &rhs)
{
return node == rhs.node;
}

bool operator!=(const typename List<T>::iterator &rhs)
{
Expand Down
Loading

0 comments on commit ae72205

Please sign in to comment.