]> git.lyx.org Git - features.git/commitdiff
use auto_ptr
authorPeter Kümmel <syntheticpp@gmx.net>
Sat, 19 Apr 2008 10:37:08 +0000 (10:37 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Sat, 19 Apr 2008 10:37:08 +0000 (10:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24347 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiClipboard.cpp

index b82ad0733a18ef6ca703ec6505e1cc5af684f969..ad032181e2337e457bf876669ff4c2045410cf19 100644 (file)
@@ -53,8 +53,7 @@
 #include <objidl.h>
 #endif // Q_WS_WIN
 
-#include <boost/shared_ptr.hpp>
-
+#include <memory>
 #include <map>
 
 using namespace std;
@@ -171,7 +170,7 @@ QVector<FORMATETC> QWindowsMimeMetafile::formatsForMime(
        return formats;
 }
 
-static boost::shared_ptr<QWindowsMimeMetafile> metafileWindowsMime;
+static std::auto_ptr<QWindowsMimeMetafile> metafileWindowsMime;
 
 #endif // Q_WS_WIN
 
@@ -236,7 +235,7 @@ QList<QByteArray> QMacPasteboardMimeGraphics::convertFromMime(QString const & mi
        return ret;
 }
 
-static boost::shared_ptr<QMacPasteboardMimeGraphics> graphicsPasteboardMime;
+static std::auto_ptr<QMacPasteboardMimeGraphics> graphicsPasteboardMime;
 
 #endif // Q_WS_MACX
 
@@ -249,17 +248,13 @@ GuiClipboard::GuiClipboard()
        on_dataChanged();
        
 #ifdef Q_WS_MACX
-       if (!graphicsPasteboardMime)
-               graphicsPasteboardMime = 
-                       boost::shared_ptr<QMacPasteboardMimeGraphics>
-                               (new QMacPasteboardMimeGraphics());
+       if (!graphicsPasteboardMime.get())
+               graphicsPasteboardMime.reset(new QMacPasteboardMimeGraphics());
 #endif // Q_WS_MACX
 
 #ifdef Q_WS_WIN
-       if (!metafileWindowsMime)
-               metafileWindowsMime = 
-                       boost::shared_ptr<QWindowsMimeMetafile>
-                               (new QWindowsMimeMetafile());
+       if (!metafileWindowsMime.get())
+               metafileWindowsMime.reset(new QWindowsMimeMetafile());
 #endif // Q_WS_WIN
 }