diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-10-16 13:04:42 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-10-16 13:04:42 +0200 |
commit | ee9afef27141f55165009fdbd58e54942f3a6867 (patch) | |
tree | b5e15e62e10daa40aef3e6d33eeabf9205d1be0f /sql/sql_list.h | |
parent | d9a8799205d160688f81362356dd2323eb8a91ea (diff) | |
parent | a619bfad30c13207fb0453a85af5740846186900 (diff) | |
download | mariadb-git-ee9afef27141f55165009fdbd58e54942f3a6867.tar.gz |
mysql-5.5.28
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r-- | sql/sql_list.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h index e3a04c36071..2b2d9e59771 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -667,6 +667,9 @@ public: inline void empty() { first= &last; last.prev= &first; } base_ilist() { empty(); } inline bool is_empty() { return first == &last; } + // Returns true if p is the last "real" object in the list, + // i.e. p->next points to the sentinel. + inline bool is_last(ilink *p) { return p->next == NULL || p->next == &last; } inline void append(ilink *a) { first->prev= &a->next; @@ -742,6 +745,7 @@ class I_List :private base_ilist { public: I_List() :base_ilist() {} + inline bool is_last(T *p) { return base_ilist::is_last(p); } inline void empty() { base_ilist::empty(); } inline bool is_empty() { return base_ilist::is_empty(); } inline void append(T* a) { base_ilist::append(a); } |