]> git.lyx.org Git - lyx.git/commitdiff
remove a few uses of boost::scoped_ptr
authorAndré Pönitz <poenitz@gmx.net>
Wed, 21 Nov 2007 23:47:47 +0000 (23:47 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 21 Nov 2007 23:47:47 +0000 (23:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21705 a592a061-630c-0410-9148-cb99ea01b6c8

14 files changed:
src/graphics/GraphicsCache.cpp
src/graphics/GraphicsCache.h
src/graphics/GraphicsCacheItem.cpp
src/graphics/GraphicsCacheItem.h
src/graphics/GraphicsConverter.cpp
src/graphics/GraphicsConverter.h
src/graphics/GraphicsLoader.cpp
src/graphics/GraphicsLoader.h
src/graphics/PreviewImage.cpp
src/graphics/PreviewImage.h
src/graphics/PreviewLoader.cpp
src/graphics/PreviewLoader.h
src/graphics/Previews.cpp
src/graphics/Previews.h

index 43743535f2504ed8b01e19db2043d01b2245eaf1..740ca053ce564c3e775f83cc664f2fbc457dc00f 100644 (file)
@@ -56,7 +56,9 @@ Cache::Cache()
 
 
 Cache::~Cache()
-{}
+{
+       delete pimpl_;
+}
 
 
 std::vector<string> Cache::loadableFormats() const
index d58ff143426cda978f53be580f8784e781671a83..a422623933912edaefce642221a39b47a5a4f2d3 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef GRAPHICSCACHE_H
 #define GRAPHICSCACHE_H
 
-#include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 
 #include <vector>
@@ -85,7 +84,7 @@ private:
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
        /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       Impl * const pimpl_;
 };
 
 } // namespace graphics
index 7b206986e28278be8f293757cd8e47df076d136a..a1310385bb918c81bcb034f57b7cb60084ac615b 100644 (file)
@@ -141,7 +141,9 @@ CacheItem::CacheItem(FileName const & file)
 
 
 CacheItem::~CacheItem()
-{}
+{
+       delete pimpl_;
+}
 
 
 FileName const & CacheItem::filename() const
index cceee96f32b028e1634305a4a8a6e8682eae9aed..34dad4b26559c602cd4d0b3ad9a8da43a41cdd31 100644 (file)
@@ -30,7 +30,6 @@
 
 #include "GraphicsTypes.h"
 
-#include <boost/scoped_ptr.hpp>
 #include <boost/signal.hpp>
 
 
@@ -48,8 +47,7 @@ class CacheItem {
 public:
        ///
        CacheItem(support::FileName const & file);
-
-       /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
+       /// Needed for the pimpl
        ~CacheItem();
 
        ///
@@ -96,9 +94,8 @@ private:
 
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
-
        /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       Impl * const pimpl_;
 };
 
 } // namespace graphics
index aace6d2b1300d0415f132da1c7b7222fbf4b0309..3ecc643168aec5bb54ec4bfe6c81b0729df2cee4 100644 (file)
@@ -102,9 +102,10 @@ Converter::Converter(FileName const & from_file, string const & to_file_base,
 {}
 
 
-// Empty d-tor out-of-line to keep boost::scoped_ptr happy.
 Converter::~Converter()
-{}
+{
+       delete pimpl_;
+}
 
 
 void Converter::startConversion() const
index d380c36577af6638e5ea23365de376fb04a06cab..f84b9e9b11b5e7cdcaffabff9a205948d8b8358f 100644 (file)
@@ -17,7 +17,6 @@
 #ifndef GRAPHICSCONVERTER_H
 #define GRAPHICSCONVERTER_H
 
-#include <boost/scoped_ptr.hpp>
 #include <boost/signal.hpp>
 
 namespace lyx {
@@ -38,7 +37,7 @@ public:
        Converter(support::FileName const & from_file, std::string const & to_file_base,
                  std::string const & from_format, std::string const & to_format);
 
-       /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
+       /// Needed for the pimpl
        ~Converter();
 
        /// We are explicit about when we begin the conversion process.
@@ -67,9 +66,8 @@ private:
 
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
-
        /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       Impl * const pimpl_;
 };
 
 } // namespace graphics
index 1863725a7f01e0a8bbd69ba2cb7e28b4bb61821f..062dc6fc13e26098912c35a400aa5bf7c090e037 100644 (file)
@@ -98,7 +98,9 @@ Loader::Loader(Loader const & other)
 
 
 Loader::~Loader()
-{}
+{
+       delete pimpl_;
+}
 
 
 Loader & Loader::operator=(Loader const & other)
index 145c0e585881af1db0d5f64a7816d3517d58ccd8..b1c82d9067d39fb47f7a8424154d7f09d7882d34 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "GraphicsTypes.h"
 
-#include <boost/scoped_ptr.hpp>
 #include <boost/signal.hpp>
 
 namespace lyx {
@@ -48,8 +47,7 @@ public:
        Loader(support::FileName const & file_with_path, Params const &);
        ///
        Loader(Loader const &);
-
-       /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
+       /// Needed for the pimpl
        ~Loader();
 
        Loader & operator=(Loader const &);
@@ -104,7 +102,7 @@ private:
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
        /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       Impl * const pimpl_;
 };
 
 } // namespace graphics
index e6083f06f02071dadc7b62df898e46b0a712200a..02af7c470a7239c2297afbf34907a626aae901ca 100644 (file)
@@ -63,7 +63,9 @@ PreviewImage::PreviewImage(PreviewLoader & l,
 
 
 PreviewImage::~PreviewImage()
-{}
+{
+       delete pimpl_;
+}
 
 
 string const & PreviewImage::snippet() const
index 4064520bd8c2a04f17b19bae2f05f61ba44c9316..6ec29a36badd1dbb3b84b009d59e12967f9c17a3 100644 (file)
@@ -12,8 +12,7 @@
 #ifndef PREVIEWIMAGE_H
 #define PREVIEWIMAGE_H
 
-#include <boost/scoped_ptr.hpp>
-#include <string>
+#include "support/strfwd.h"
 
 namespace lyx {
 
@@ -54,7 +53,7 @@ private:
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
        /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       Impl * const pimpl_;
 };
 
 } // namespace graphics
index c81760bd85bb31f2b7ec4f2872cb134eaad18083..5cd738f5d0da9ebd6cf0ebc7f352e1d14f4f91cf 100644 (file)
@@ -210,7 +210,6 @@ typedef InProgressProcesses::value_type InProgressProcess;
 
 
 namespace lyx {
-
 namespace graphics {
 
 class PreviewLoader::Impl : public boost::signals::trackable {
@@ -288,7 +287,9 @@ PreviewLoader::PreviewLoader(Buffer const & b)
 
 
 PreviewLoader::~PreviewLoader()
-{}
+{
+       delete pimpl_;
+}
 
 
 PreviewImage const * PreviewLoader::preview(string const & latex_snippet) const
index d954401b7b996d35c2c40e375c06edfa9ed11c15..0227466f7da4b3da4d6d00445ed1bbf0e2c07e2b 100644 (file)
@@ -18,7 +18,6 @@
 #ifndef PREVIEWLOADER_H
 #define PREVIEWLOADER_H
 
-#include <boost/scoped_ptr.hpp>
 #include <boost/signal.hpp>
 
 
@@ -95,7 +94,7 @@ private:
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
        /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       Impl * const pimpl_;
 };
 
 } // namespace graphics
index 5f7ad4d8c9f76ffe842b60def3a117147de934d7..5a6772e3dcd0997363d83cbcd6c055ae097c9017 100644 (file)
@@ -54,7 +54,9 @@ Previews::Previews()
 
 
 Previews::~Previews()
-{}
+{
+       delete pimpl_;
+}
 
 
 PreviewLoader & Previews::loader(Buffer const & buffer) const
index 429855c44af5586458634e49a144a77ccc22a3b0..0a50e29e36b3c64d679eedb90b053f1bfe99464f 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef PREVIEWS_H
 #define PREVIEWS_H
 
-#include <boost/scoped_ptr.hpp>
-
 namespace lyx {
 
 class Buffer;
@@ -62,7 +60,7 @@ private:
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
        /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       Impl * const pimpl_;
 };
 
 } // namespace graphics