|  auto_ptr<Inset> MathMacro::doClone() const
|  {
| -     return auto_ptr<Inset>(new MathMacro(*this));
| +     MathMacro * copy = new MathMacro(*this);
| +     copy->needsUpdate_ = true;
| +     copy->expanded_.cell(0).clear();
| +     return auto_ptr<Inset>(copy);
|  }

Why not:

        auto_ptr<Inset> tmpInset(new MathMacro(*this));
        tmpInset->needsUpdate_ = true;
        tmpInset->expanded_.cell(0).clear();
        return tmpInset;
?

A bit safer if it works.

Why is it safer?

Stefan


Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to