diff options
Diffstat (limited to 'command/marks.cpp')
-rw-r--r-- | command/marks.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/command/marks.cpp b/command/marks.cpp index 8587e0d..d84fafd 100644 --- a/command/marks.cpp +++ b/command/marks.cpp @@ -32,14 +32,7 @@ clMark::~clMark() clMarks::~clMarks() { - clMark *next,*mark=first; - while (mark) - { - next=mark->Next(); - Del(mark); - mark=next; - } - + Clear(); } int clMarks::Count(int Type) @@ -71,6 +64,19 @@ void clMarks::Del(int Type) } } +void clMarks::Clear() +{ + clMark *next,*mark=first; + while (mark) + { + next=mark->Next(); + Del(mark); + mark=next; + } + first=NULL; + last=NULL; +} + void clMarks::Del(clMark *Mark) { if (!Mark) return; |