diff --git a/src/mathed/math_atom.C b/src/mathed/math_atom.C index a8e2815a0f..2df8786f85 100644 --- a/src/mathed/math_atom.C +++ b/src/mathed/math_atom.C @@ -48,22 +48,7 @@ void MathAtom::operator=(MathAtom const & at) } -void MathAtom::operator=(MathInset * p) -{ - reset(p); -} - - MathAtom::~MathAtom() { delete nucleus_; } - - -void MathAtom::reset(MathInset * p) -{ - if (p == nucleus_) - return; - delete nucleus_; - nucleus_ = p; -} diff --git a/src/mathed/math_atom.h b/src/mathed/math_atom.h index 4a7d1c1a51..0e99e20efb 100644 --- a/src/mathed/math_atom.h +++ b/src/mathed/math_atom.h @@ -45,10 +45,6 @@ public: ~MathAtom(); /// assignment invokes nucleus_->clone() void operator=(MathAtom const &); - /// change inset under the hood - void operator=(MathInset * p); - /// change inset under the hood - void reset(MathInset * p); /// access to the inset (checked with gprof) MathInset const * nucleus() const { return nucleus_; } MathInset * nucleus() { return nucleus_; } diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 4a38a0eb4f..a1a4ab693c 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -506,7 +506,7 @@ bool Parser::parse(MathAtom & at) parse(ar, false, MathInset::UNDECIDED_MODE); if (ar.size() != 1 || ar.front()->getType() == "none") { lyxerr << "unusual contents found: " << ar << endl; - at.reset(new MathParInset); + at = MathAtom(new MathParInset); if (at->nargs() > 0) at->cell(0) = ar; else