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.
This commit is contained in:
parent
5a4ae142f4
commit
4387e3a13b
@ -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…
x
Reference in New Issue
Block a user