summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-13 18:18:25 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-13 18:18:25 +0300
commit4bd56a697ff2d2edc230a82dbfcf4412ef0996df (patch)
tree77a6e74518875d83ecaf6447b5f5b8801ef50b2f /include
parent863e28ff3ed0a5859561c397cbfb492170989ddd (diff)
parent3e617b8bef50a81b10b8152d800a1b8b38859913 (diff)
downloadmariadb-git-4bd56a697ff2d2edc230a82dbfcf4412ef0996df.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'include')
-rw-r--r--include/ilist.h9
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)