diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-13 18:18:25 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-13 18:18:25 +0300 |
commit | 4bd56a697ff2d2edc230a82dbfcf4412ef0996df (patch) | |
tree | 77a6e74518875d83ecaf6447b5f5b8801ef50b2f /include | |
parent | 863e28ff3ed0a5859561c397cbfb492170989ddd (diff) | |
parent | 3e617b8bef50a81b10b8152d800a1b8b38859913 (diff) | |
download | mariadb-git-4bd56a697ff2d2edc230a82dbfcf4412ef0996df.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'include')
-rw-r--r-- | include/ilist.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/ilist.h b/include/ilist.h index 74cb472cd4e..f0d15054ab8 100644 --- a/include/ilist.h +++ b/include/ilist.h @@ -18,6 +18,8 @@ #pragma once +#include "my_dbug.h" + #include <cstddef> #include <iterator> @@ -26,8 +28,7 @@ template <class Tag= void> struct ilist_node { ilist_node() #ifndef DBUG_OFF - : - next(NULL), prev(NULL) + : next(NULL), prev(NULL) #endif { } @@ -70,11 +71,12 @@ public: typedef T *pointer; typedef T &reference; - Iterator(ListNode *node) : node_(node) {} + Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_ != NULL); } Iterator &operator++() { node_= node_->next; + DBUG_ASSERT(node_ != NULL); return *this; } Iterator operator++(int) @@ -87,6 +89,7 @@ public: Iterator &operator--() { node_= node_->prev; + DBUG_ASSERT(node_); return *this; } Iterator operator--(int) |