X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathAtom.h;h=5d20e69bbf0d863114a57b78cda3966661c6a522;hb=999831043e6da50b3095a2dfec7000d4209e586c;hp=7801fe6c5d268d7f7eef43e4add1ca0d79d13117;hpb=b382b246b62b66100733449b2bf75a01fd1d263f;p=lyx.git diff --git a/src/mathed/MathAtom.h b/src/mathed/MathAtom.h index 7801fe6c5d..5d20e69bbf 100644 --- a/src/mathed/MathAtom.h +++ b/src/mathed/MathAtom.h @@ -40,15 +40,14 @@ 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 +58,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_; };