Skip to content
Permalink
Browse files
replace assert() with DBUG_ASSERT()
  • Loading branch information
kevgs committed Aug 12, 2020
1 parent 01738d0 commit 5a4ae14
Showing 1 changed file with 5 additions and 3 deletions.
@@ -18,6 +18,8 @@

#pragma once

#include "my_dbug.h"

#include <cstddef>
#include <iterator>

@@ -69,12 +71,12 @@ template <class T, class Tag= void> class ilist
typedef T *pointer;
typedef T &reference;

Iterator(ListNode *node) : node_(node) { assert(node_); }
Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_); }

Iterator &operator++()
{
node_= node_->next;
assert(node_);
DBUG_ASSERT(node_);
return *this;
}
Iterator operator++(int)
@@ -87,7 +89,7 @@ template <class T, class Tag= void> class ilist
Iterator &operator--()
{
node_= node_->prev;
assert(node_);
DBUG_ASSERT(node_);
return *this;
}
Iterator operator--(int)

0 comments on commit 5a4ae14

Please sign in to comment.