diff options
author | Jochen Dolze <vdr@dolze.de> | 2010-03-23 21:22:09 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2010-03-23 21:22:09 +0100 |
commit | 2536e2274be47a822eb6034d5f359070c4c7270b (patch) | |
tree | 960f2a2bef50b90be9a27f2d6736fe3bc202ba0c /marks.cpp | |
parent | 616e154c45b6d30233375c0d5f53027b47975bc9 (diff) | |
download | vdr-plugin-markad-2536e2274be47a822eb6034d5f359070c4c7270b.tar.gz vdr-plugin-markad-2536e2274be47a822eb6034d5f359070c4c7270b.tar.bz2 |
Added more marktypes, added initial mark rating
Diffstat (limited to 'marks.cpp')
-rw-r--r-- | marks.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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(); |