]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_atom.C
further code uglification to make Jean-Marc's compiler happy
[lyx.git] / src / mathed / math_atom.C
index cedad2b5c54ac8ca64eefa4a1d46ec1a0acc7783..0d90ab8d1d985f39108a154b5516b9cfeb67138e 100644 (file)
@@ -42,6 +42,13 @@ MathAtom::MathAtom(MathInset * p)
 }
 
 
+MathAtom::MathAtom(MathInset * p, MathScriptInset * up, MathScriptInset * down)
+       : nucleus_(p), limits_(0), xo_(0), yo_(0)
+{
+       script_[0] = down;
+       script_[1] = up;
+}
+
 
 MathAtom::MathAtom(MathAtom const & p)
 {
@@ -204,6 +211,18 @@ MathScriptInset * MathAtom::down() const
 }
 
 
+MathScriptInset * & MathAtom::up()
+{
+       return script_[1];
+}
+
+
+MathScriptInset * & MathAtom::down()
+{
+       return script_[0];
+}
+
+
 int MathAtom::dy0() const
 {
        if (!down())
@@ -351,14 +370,14 @@ bool MathAtom::hasLimits() const
 }
 
 
-void MathAtom::substitute(MathArray & array, MathMacro const & m) const
+void MathAtom::substitute(MathMacro const & m)
 {
        if (nucleus())
-               nucleus()->substitute(array, m);
+               nucleus()->substitute(m);
        if (up())
-               up()->substitute(array, m);
+               up()->substitute(m);
        if (down())
-               down()->substitute(array, m);
+               down()->substitute(m);
 }