From 12f1fb2b61d608fbfeae4522bdf3ff9f0333dd7e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 2 May 2006 13:33:25 +0000 Subject: [PATCH] Bugfix in constructor from a range and clear() --- Interval_skip_list/include/CGAL/Interval_skip_list.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Interval_skip_list/include/CGAL/Interval_skip_list.h b/Interval_skip_list/include/CGAL/Interval_skip_list.h index 4f9a5cc60d4..094735201fe 100644 --- a/Interval_skip_list/include/CGAL/Interval_skip_list.h +++ b/Interval_skip_list/include/CGAL/Interval_skip_list.h @@ -215,6 +215,11 @@ class Interval_for_container : public Interval_ template Interval_skip_list(InputIterator b, InputIterator e) { + maxLevel = 0; + header = new IntervalSLnode(MAX_FORWARD); + for (int i = 0; i< MAX_FORWARD; i++) { + header->forward[i] = 0; + } for(; b!= e; ++b){ insert(*b); } @@ -555,6 +560,9 @@ class Interval_for_container : public Interval_ header = next; } header = new IntervalSLnode(MAX_FORWARD); + for (int i = 0; i< MAX_FORWARD; i++) { + header->forward[i] = 0; + } maxLevel = 0; }