X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_atom.C;h=a8e2815a0f146acfd65d18ebd5f2e069f4dfafcb;hb=c649284611c4198c9d70be8a16d153cdf1ec0700;hp=76fc538851833e1c95f916cb8cad07cb1c37b77b;hpb=2b8ef58dc021912b2862328b9000cfe37578ea37;p=lyx.git diff --git a/src/mathed/math_atom.C b/src/mathed/math_atom.C index 76fc538851..a8e2815a0f 100644 --- a/src/mathed/math_atom.C +++ b/src/mathed/math_atom.C @@ -34,20 +34,26 @@ MathAtom::MathAtom(MathInset * p) {} -MathAtom::MathAtom(MathAtom const & p) - : nucleus_(p.nucleus_ ? p.nucleus_->clone() : 0) +MathAtom::MathAtom(MathAtom const & at) + : nucleus_(at.nucleus_ ? at.nucleus_->clone() : 0) {} -void MathAtom::operator=(MathAtom const & p) +void MathAtom::operator=(MathAtom const & at) { - if (&p == this) + if (&at == this) return; - MathAtom tmp(p); + MathAtom tmp(at); std::swap(tmp.nucleus_, nucleus_); } +void MathAtom::operator=(MathInset * p) +{ + reset(p); +} + + MathAtom::~MathAtom() { delete nucleus_;