Commit 4387e3a1 authored by Marko Mäkelä's avatar Marko Mäkelä

Use DBUG_ASSERT(ptr != NULL) to ease merging to 10.3

In 10.3, DBUG_ASSERT() may expand to something that includes
__builtin_expect(), which expects integer arguments, not pointers.
To avoid any compiler warnings, let us use an explicit rather than
implicit comparison to the null pointer.
parent 5a4ae142
......@@ -71,12 +71,12 @@ template <class T, class Tag= void> class ilist
typedef T *pointer;
typedef T &reference;
Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_); }
Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_ != NULL); }
Iterator &operator++()
{
node_= node_->next;
DBUG_ASSERT(node_);
DBUG_ASSERT(node_ != NULL);
return *this;
}
Iterator operator++(int)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment