commit 1fb31ab92d9c8d1d8d189b31419c7cd8d9554e4b
Author: Georg Baum <[email protected]>
Date: Sun Mar 22 17:29:22 2015 +0100
Use standard comparison against end
This makes it more easy to exchange the underlying iterator. Also, use our
own specialized erase() instead of repeating its implementation.
diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp
index 1b79f0c..2d5bcd0 100644
--- a/src/mathed/MathData.cpp
+++ b/src/mathed/MathData.cpp
@@ -676,7 +676,7 @@ void MathData::attachMacroParameters(Cursor * cur,
}
// remove them from the MathData
- erase(begin() + macroPos + 1, begin() + p);
+ erase(macroPos + 1, p);
// cursor outside this MathData?
if (thisSlice == -1)
@@ -883,7 +883,7 @@ MathData::size_type MathData::x2pos(BufferView const * bv,
int targetx, int glue
int currx = 0;
CoordCacheBase<Inset> const & coords = bv->coordCache().getInsets();
// find first position after targetx
- for (; currx < targetx && it < end(); ++it) {
+ for (; currx < targetx && it != end(); ++it) {
lastx = currx;
if ((*it)->getChar() == ' ')
currx += glue;