]> git.lyx.org Git - lyx.git/blobdiff - src/DocIterator.cpp
Try another way to signal a false positive to coverity
[lyx.git] / src / DocIterator.cpp
index fdb61876d6ca3975e9b0b417f1dea9804fb86bd8..51b44d88ef00b153c0ec9155afcfd16203fbb9af 100644 (file)
@@ -318,6 +318,24 @@ Inset * DocIterator::innerInsetOfType(int code) const
 }
 
 
+bool DocIterator::posBackward()
+{
+       if (pos() == 0)
+               return false;
+       --pos();
+       return true;
+}
+
+
+bool DocIterator::posForward()
+{
+       if (pos() == lastpos())
+               return false;
+       ++pos();
+       return true;
+}
+
+
 // This duplicates code above, but is in the critical path.
 // So please think twice before adding stuff
 void DocIterator::forwardPos()