aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SparseVector.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SparseVector.h b/src/SparseVector.h
index 01d651f0d..ccee58df5 100644
--- a/src/SparseVector.h
+++ b/src/SparseVector.h
@@ -189,6 +189,13 @@ public:
}
Check();
}
+ Sci::Position PositionNext(Sci::Position start) const noexcept {
+ const Sci::Position element = ElementFromPosition(start);
+ if (element < Elements()) {
+ return PositionOfElement(element + 1);
+ }
+ return Length() + 1; // Out of bounds to terminate
+ }
Sci::Position IndexAfter(Sci::Position position) const noexcept {
assert(position < Length());
if (position < 0)