X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathAtom.h;h=aa6e317f899b0196891e65f7f4dd42f1cb7014a1;hb=d9082639080b9de993742bd352f92e5183058cf5;hp=7801fe6c5d268d7f7eef43e4add1ca0d79d13117;hpb=b382b246b62b66100733449b2bf75a01fd1d263f;p=lyx.git diff --git a/src/mathed/MathAtom.h b/src/mathed/MathAtom.h index 7801fe6c5d..aa6e317f89 100644 --- a/src/mathed/MathAtom.h +++ b/src/mathed/MathAtom.h @@ -40,15 +40,13 @@ Andre' */ -#include - +#include "support/unique_ptr.h" namespace lyx { -class Inset; class InsetMath; -class MathAtom : public std::unique_ptr { +class MathAtom { public: MathAtom() = default; MathAtom(MathAtom &&) = default; @@ -59,8 +57,12 @@ public: MathAtom(MathAtom const &); MathAtom & operator=(MathAtom const &); /// access to the inset - InsetMath * nucleus() { return get(); } - InsetMath const * nucleus() const { return get(); } + InsetMath * nucleus() { return nucleus_.get(); } + InsetMath const * nucleus() const { return nucleus_.get(); } + InsetMath * operator->() { return nucleus_.get(); } + InsetMath const * operator->() const { return nucleus_.get(); } +private: + std::unique_ptr nucleus_; };