]> git.lyx.org Git - features.git/blobdiff - src/mathed/math_matrixinset.C
iterators for MathArray; cosmetics;
[features.git] / src / mathed / math_matrixinset.C
index 4684a59820c8ee3a471f888513eebe7f14bef21a..8508b4a57245f1b5833cfa88ff29fc9a1de2b7d4 100644 (file)
@@ -68,9 +68,9 @@ int getCols(short int type)
 // used for "intelligent splitting"
 int firstRelOp(MathArray const & array)
 {
-       for (int pos = 0; pos < array.size(); ++pos)
-               if (MathIsRelOp(array.getChar(pos), array.getCode(pos)))
-                       return pos;
+       for (MathArray::const_iterator it = array.begin(); it != array.end(); ++it)
+               if ((*it)->isRelOp())
+                       return it - array.begin();
        return array.size();
 }