]> git.lyx.org Git - features.git/commitdiff
std::auto_ptr -> boost::scoped_ptr and compile fix.
authorAngus Leeming <leeming@lyx.org>
Wed, 26 Jun 2002 16:57:59 +0000 (16:57 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 26 Jun 2002 16:57:59 +0000 (16:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4490 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/ChangeLog
src/graphics/GraphicsLoader.C
src/graphics/GraphicsLoader.h
src/insets/ChangeLog
src/insets/insetgraphics.h

index b763b1779a0333ffeab5af9377d20710756715cf..87389b69c09a1d4f1f5c794b8486f51308b77e52 100644 (file)
@@ -1,3 +1,9 @@
+2002-06-26  Angus Leeming  <leeming@lyx.org>
+
+       * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
+       std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
+       compiles.
+
 2002-06-26  Angus Leeming  <leeming@lyx.org>
 
        * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
index 0bb07e1f174968b8a838595a25e39d828db1faba..d0c582ce06f2e5b49f407fbe8983b570416d198f 100644 (file)
@@ -153,6 +153,10 @@ Loader::Loader(string const & file, GParams const & params)
 }
 
 
+Loader::~Loader()
+{}
+
+
 void Loader::reset(string const & file, DisplayType type)
 {
        pimpl_->unsetOldFile();
index 6fc988af4bd455dc51feb32174a5dc608e3a00b1..8cb1408bf96e0b156a77a88c6379b91b7bfb3420 100644 (file)
@@ -28,7 +28,7 @@
 #include "LString.h"
 
 #include <boost/signals/signal0.hpp>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
 
 namespace grfx {
 
@@ -46,6 +46,9 @@ public:
        /// The image is transformed before display.
        Loader(string const & file_with_path, GParams const &);
 
+       /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
+       ~Loader();
+
        /// The file can be changed, or the display params, or both.
        void reset(string const & file_with_path, DisplayType = ColorDisplay);
        ///
@@ -76,7 +79,7 @@ private:
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
        /// The pointer never changes although *pimpl_'s contents may.
-       std::auto_ptr<Impl> const pimpl_;
+       boost::scoped_ptr<Impl> const pimpl_;
 };
 
 } // namespace grfx
index e2333d4fea481a1742e2bc374b2e2c60e56e2ee5..fe4f2da56d6d5c01b7c5b3920aa31872f49b9466 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-26  Angus Leeming  <leeming@lyx.org>
+
+       * insetgraphics.h: use boost::scoped_ptr in preference to
+       std::auto_ptr.
+
 2002-06-26  Angus Leeming  <leeming@lyx.org>
 
        * insetgraphics.C: moved the image loading stuff into a new class
index 62a6216f86f2be3cb73cb2815af350b84023ffe9..ccbdf709a35e570520ff8b7691f724e09fa3ec34 100644 (file)
@@ -25,8 +25,7 @@
 // We need a signal here to hide an active dialog when we are deleted.
 #include <boost/signals/signal0.hpp>
 #include <boost/signals/trackable.hpp>
-
-#include <memory> // auto_ptr
+#include <boost/scoped_ptr.hpp>
 
 class Dialogs;
 class LaTeXFeatures;
@@ -128,11 +127,8 @@ private:
        /// The cached variables
        class Cache;
        friend class Cache;
-       /** Can change the contents of the cache, but not the pointer.
-        *  Use std::auto_ptr not boost::scoped_ptr so we do not have to define
-        *  Cache in advance.
-        */
-       std::auto_ptr<Cache> const cache_;
+       /// The pointer never changes although *cache_'s contents may.
+       boost::scoped_ptr<Cache> const cache_;
 };
 
 #endif