]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_hullinset.C
forward search in math insets. ugly. seems to work. don't ask why.
[lyx.git] / src / mathed / math_hullinset.C
index 939f64db0ccd37359cde6359b19002805bc0c5a0..fa7bdd36ce8733793495f3e09b704cdc169a3b64 100644 (file)
@@ -5,12 +5,13 @@
 #endif
 
 #include "math_hullinset.h"
+#include "math_mathmlstream.h"
+#include "math_streamstr.h"
 #include "math_support.h"
 #include "debug.h"
 #include "Painter.h"
 #include "LaTeXFeatures.h"
-#include "math_mathmlstream.h"
-#include "math_streamstr.h"
+#include "support/LAssert.h"
 
 #include <vector>
 
@@ -191,6 +192,8 @@ void MathHullInset::draw(Painter & pain, int x, int y) const
 
 string MathHullInset::label(row_type row) const
 {
+       row_type n = nrows();
+       lyx::Assert(row < n);
        return label_[row];
 }
 
@@ -687,3 +690,10 @@ void MathHullInset::mathmlize(MathMLStream & os) const
 }
 
 
+void MathHullInset::check() const
+{
+       lyx::Assert(nonum_.size() == nrows());
+       lyx::Assert(label_.size() == nrows());
+}
+
+