]> git.lyx.org Git - features.git/commitdiff
code that's not there cannot be wrong...
authorAndré Pönitz <poenitz@gmx.net>
Thu, 8 Aug 2002 17:19:26 +0000 (17:19 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 8 Aug 2002 17:19:26 +0000 (17:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4908 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_atom.C
src/mathed/math_atom.h
src/mathed/math_parser.C

index a8e2815a0f146acfd65d18ebd5f2e069f4dfafcb..2df8786f856550e495d1e95510ba55711162afb7 100644 (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;
-}
index 4a7d1c1a51bbce0a434cfde56cda4a9ef239849f..0e99e20efbdcf3ce5105dacdc27702c157f339bb 100644 (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_; }
index 4a38a0eb4f6007471894bea54b643062a5778c95..a1a4ab693ceb0cbfdea55c6ec39b49387b0a7d98 100644 (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