summaryrefslogtreecommitdiff
path: root/marks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'marks.cpp')
-rw-r--r--marks.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/marks.cpp b/marks.cpp
index 5a59b2e..3d4b81a 100644
--- a/marks.cpp
+++ b/marks.cpp
@@ -42,6 +42,22 @@ clMarks::~clMarks()
}
+int clMarks::Count(int Type)
+{
+ if (Type==0xFF) return count;
+
+ if (!first) return 0;
+
+ int ret=0;
+ clMark *mark=first;
+ while (mark)
+ {
+ if (mark->type==Type) ret++;
+ mark=mark->Next();
+ }
+ return ret;
+}
+
void clMarks::Del(int Type)
{
if (!first) return; // no elements yet
@@ -115,7 +131,7 @@ clMark *clMarks::GetNext(int Position)
clMark *mark=first;
while (mark)
{
- if (Position>mark->position) break;
+ if (Position>=mark->position) break;
mark=mark->Next();
}
return mark->Next();