From: André Pönitz Date: Thu, 8 Aug 2002 17:19:26 +0000 (+0000) Subject: code that's not there cannot be wrong... X-Git-Tag: 1.6.10~18634 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=15d40ab329661815f3e4ab9637e7ef992ad730c4;p=features.git code that's not there cannot be wrong... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4908 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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