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
This commit is contained in:
André Pönitz 2002-08-08 17:19:26 +00:00
parent c567e8312a
commit 15d40ab329
3 changed files with 1 additions and 20 deletions

View File

@ -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;
}

View File

@ -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_; }

View File

@ -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