]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathData.cpp
* src/mathed/InsetMathHull.cpp:
[lyx.git] / src / mathed / MathData.cpp
index e4a8f49e08eed3db718098a2a6c9586b21f7a638..70b05f3223e6b00e9ba5bee0291424c8079e7bdd 100644 (file)
@@ -36,7 +36,7 @@
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
 
-#include <boost/assert.hpp>
+#include "support/lassert.h"
 #include <boost/next_prior.hpp>
 
 #include <cstdlib>
@@ -53,14 +53,14 @@ MathData::MathData(const_iterator from, const_iterator to)
 
 MathAtom & MathData::operator[](pos_type pos)
 {
-       BOOST_ASSERT(pos < size());
+       LASSERT(pos < size(), /**/);
        return base_type::operator[](pos);
 }
 
 
 MathAtom const & MathData::operator[](pos_type pos) const
 {
-       BOOST_ASSERT(pos < size());
+       LASSERT(pos < size(), /**/);
        return base_type::operator[](pos);
 }
 
@@ -73,7 +73,7 @@ void MathData::insert(size_type pos, MathAtom const & t)
 
 void MathData::insert(size_type pos, MathData const & ar)
 {
-       BOOST_ASSERT(pos <= size());
+       LASSERT(pos <= size(), /**/);
        base_type::insert(begin() + pos, ar.begin(), ar.end());
 }
 
@@ -382,7 +382,8 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc)
        // go over the array and look for macros
        for (size_t i = 0; i < size(); ++i) {
                MathMacro * macroInset = operator[](i).nucleus()->asMacro();
-               if (!macroInset)
+               if (!macroInset || macroInset->name_[0] == '^'
+                               || macroInset->name_[0] == '_')
                        continue;
                
                // get macro
@@ -459,8 +460,8 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc)
                InsetMath * inset = operator[](i).nucleus();
                if (inset->asScriptInset())
                        inset = inset->asScriptInset()->nuc()[0].nucleus();
-               BOOST_ASSERT(inset->asMacro());
-               inset->asMacro()->updateRepresentation(cur);
+               LASSERT(inset->asMacro(), /**/);
+               inset->asMacro()->updateRepresentation();
        }
 }