]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
elist: add a clear_list function.
authorGreg Farnum <gregf@hq.newdream.net>
Wed, 15 Dec 2010 00:43:45 +0000 (16:43 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Thu, 6 Jan 2011 19:12:14 +0000 (11:12 -0800)
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
src/include/elist.h

index 553fd419de9c92a9c1c2cb964cd7d9dbde31be29..051978169a716f9f711e19f893d32a8ae52d8a13 100644 (file)
@@ -126,6 +126,11 @@ public:
     _head._prev->remove_myself();
   }
 
+  void clear_list() {
+    while (!empty())
+      pop_front();
+  }
+
   enum mode_t {
     MAGIC, CURRENT, CACHE_NEXT
   };