Skip to content

Commit ae72205

Browse files
committed
cleanup: replace List_iterator(_fast) in handler0alter.cc
Basically, use more List<T>::iterator. This patch required adding two more overloads to new iterator for convenience.
1 parent 83a0eae commit ae72205

File tree

2 files changed

+94
-147
lines changed

2 files changed

+94
-147
lines changed

sql/sql_list.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,12 @@ template <class T> class List :public base_list
569569
}
570570

571571
T &operator*() { return *static_cast<T *>(node->info); }
572+
T *operator->() { return static_cast<T *>(node->info); }
573+
574+
bool operator==(const typename List<T>::iterator &rhs)
575+
{
576+
return node == rhs.node;
577+
}
572578

573579
bool operator!=(const typename List<T>::iterator &rhs)
574580
{

0 commit comments

Comments
 (0)