]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathAtom.h
Force a Buffer * argument to math insets constructor
[lyx.git] / src / mathed / MathAtom.h
index 7801fe6c5d268d7f7eef43e4add1ca0d79d13117..aa6e317f899b0196891e65f7f4dd42f1cb7014a1 100644 (file)
@@ -40,15 +40,13 @@ Andre'
 
 */
 
-#include <memory>
-
+#include "support/unique_ptr.h"
 
 namespace lyx {
 
-class Inset;
 class InsetMath;
 
-class MathAtom : public std::unique_ptr<InsetMath> {
+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<InsetMath> nucleus_;
 };