]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfoot.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetfoot.C
index a1ca0bc16148acbdb88d2018fb6d451a6b84a52c..5b5e07a2aa7be20d350acb0b18c4ac9b7a019eac 100644 (file)
@@ -28,6 +28,7 @@
 
 
 using std::ostream;
+using std::auto_ptr;
 
 
 InsetFoot::InsetFoot(BufferParams const & bp)
@@ -38,17 +39,17 @@ InsetFoot::InsetFoot(BufferParams const & bp)
 }
 
 
-InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
-       : InsetFootlike(in, same_id)
+InsetFoot::InsetFoot(InsetFoot const & in)
+       : InsetFootlike(in)
 {
        setLabel(_("foot"));
        setInsetName("Foot");
 }
 
 
-Inset * InsetFoot::clone(Buffer const &, bool same_id) const
+auto_ptr<InsetBase> InsetFoot::clone() const
 {
-       return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
+       return auto_ptr<InsetBase>(new InsetFoot(*this));
 }