From 1c928369d5f33c4907f96f21f21c87e3dc17796d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 12 Mar 2010 15:26:15 -0800 Subject: [PATCH] dlist: clean up interface --- src/include/dlist.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/dlist.h b/src/include/dlist.h index faa3ab55bc0c..fc37f5f85512 100644 --- a/src/include/dlist.h +++ b/src/include/dlist.h @@ -24,7 +24,7 @@ public: item(T i) : _item(i), _prev(this), _next(this) {} ~item() { - assert(!is_on_dlist()); + assert(!is_on_list()); } // no copying! item(const item& other); @@ -32,7 +32,8 @@ public: bool empty() { return _prev == this; } - bool is_on_dlist() { return !empty(); } + bool is_on_list() { return !empty(); } + bool remove_myself() { if (_next == this) { assert(_prev == this); -- 2.47.3