* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author André Pönitz
+ * \author André Pönitz
* \author Stefan Schimanski
*
* Full author contact details are available in file CREDITS.
#include "frontends/FontMetrics.h"
#include "frontends/Painter.h"
-#include <boost/assert.hpp>
+#include "support/lassert.h"
#include <boost/next_prior.hpp>
#include <cstdlib>
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);
}
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());
}
// 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
InsetMath * inset = operator[](i).nucleus();
if (inset->asScriptInset())
inset = inset->asScriptInset()->nuc()[0].nucleus();
- BOOST_ASSERT(inset->asMacro());
+ LASSERT(inset->asMacro(), /**/);
inset->asMacro()->updateRepresentation();
}
}