Browse Source

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.
bb-10.2-MDEV-23484
Marko Mäkelä 5 years ago
parent
commit
4387e3a13b
  1. 4
      include/ilist.h

4
include/ilist.h

@ -71,12 +71,12 @@ public:
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)

Loading…
Cancel
Save