Commit 5a4ae142 authored by Eugene Kosov's avatar Eugene Kosov

replace assert() with DBUG_ASSERT()

parent 01738d08
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#pragma once #pragma once
#include "my_dbug.h"
#include <cstddef> #include <cstddef>
#include <iterator> #include <iterator>
...@@ -69,12 +71,12 @@ template <class T, class Tag= void> class ilist ...@@ -69,12 +71,12 @@ template <class T, class Tag= void> class ilist
typedef T *pointer; typedef T *pointer;
typedef T &reference; typedef T &reference;
Iterator(ListNode *node) : node_(node) { assert(node_); } Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_); }
Iterator &operator++() Iterator &operator++()
{ {
node_= node_->next; node_= node_->next;
assert(node_); DBUG_ASSERT(node_);
return *this; return *this;
} }
Iterator operator++(int) Iterator operator++(int)
...@@ -87,7 +89,7 @@ template <class T, class Tag= void> class ilist ...@@ -87,7 +89,7 @@ template <class T, class Tag= void> class ilist
Iterator &operator--() Iterator &operator--()
{ {
node_= node_->prev; node_= node_->prev;
assert(node_); DBUG_ASSERT(node_);
return *this; return *this;
} }
Iterator operator--(int) 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