]> git.lyx.org Git - features.git/commitdiff
remove one <boost/shared_ptr.hpp>
authorAndré Pönitz <poenitz@gmx.net>
Thu, 22 Nov 2007 00:03:18 +0000 (00:03 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 22 Nov 2007 00:03:18 +0000 (00:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21707 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/GraphicsCacheItem.cpp
src/graphics/GraphicsImage.cpp
src/graphics/GraphicsImage.h
src/graphics/GraphicsLoader.cpp

index a1310385bb918c81bcb034f57b7cb60084ac615b..83bf09d289a0b88d09c716dc07705daa0b8ba33f 100644 (file)
@@ -295,7 +295,7 @@ void CacheItem::Impl::loadImage()
        setStatus(Loading);
        LYXERR(Debug::GRAPHICS, "Loading image.");
 
-       image_ = Image::newImage();
+       image_.reset(Image::newImage());
 
        cl_.disconnect();
        cl_ = image_->finishedLoading.connect(
index ccb96206e33c9152eedbcdb9abd97093ce2f89d2..b1abf942db7d9e9c65d8b7fa354dc3968c313610 100644 (file)
@@ -22,7 +22,7 @@ namespace graphics {
 
 // This is to be connected to a function that will return a new
 // instance of a viable derived class.
-boost::function<Image::ImagePtr()> Image::newImage;
+boost::function<Image *()> Image::newImage;
 
 /// Return the list of loadable formats.
 boost::function<Image::FormatList()> Image::loadableFormats;
index f85bc8925b248b9b294bd9e1a7536a82e4d41a86..6b25f6505250005080f77f37f240a57aac3e9f14 100644 (file)
@@ -25,7 +25,6 @@
 #define GRAPHICSIMAGE_H
 
 #include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
 #include <boost/signal.hpp>
 
 #include <vector>
@@ -44,9 +43,7 @@ public:
        /** This is to be connected to a function that will return a new
         *  instance of a viable derived class.
         */
-       typedef boost::shared_ptr<Image> ImagePtr;
-       ///
-       static boost::function<ImagePtr()> newImage;
+       static boost::function<Image *()> newImage;
 
        ///
        typedef std::vector<std::string> FormatList;
index 062dc6fc13e26098912c35a400aa5bf7c090e037..a7ac094cd2e69690deafb0c776e15504b89a1ab7 100644 (file)
@@ -29,6 +29,8 @@ using support::FileName;
 
 namespace graphics {
 
+typedef boost::shared_ptr<Image> ImagePtr;
+
 class Loader::Impl : public boost::signals::trackable {
 public:
        ///
@@ -53,7 +55,7 @@ public:
         */
        Cache::ItemPtr cached_item_;
        /// We modify a local copy of the image once it is loaded.
-       Image::ImagePtr image_;
+       ImagePtr image_;
        /// This signal is emitted when the image loading status changes.
        boost::signal<void()> signal_;
        /// The connection of the signal StatusChanged