]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsLoader.cpp
C++11 supports thread-safe initialization of statics
[lyx.git] / src / graphics / GraphicsLoader.cpp
index 23ebb623948f9fee8bc9b6c27951fe92e28b1f33..36a6c06d2c12748f2f834612d756c313e984b55d 100644 (file)
@@ -22,8 +22,9 @@
 
 #include "support/bind.h"
 
-#include <set>
 #include <queue>
+#include <memory>
+#include <set>
 
 using namespace std;
 using namespace lyx::support;
@@ -77,7 +78,6 @@ static int const s_numimages_ = 10;
 static int const s_millisecs_ = 500;
 
 
-// FIXME THREAD
 LoaderQueue & LoaderQueue::get()
 {
        static LoaderQueue singleton;
@@ -159,9 +159,9 @@ void LoaderQueue::touch(Cache::ItemPtr const & item)
 //
 /////////////////////////////////////////////////////////////////////
 
-typedef shared_ptr<Image> ImagePtr;
+typedef std::shared_ptr<Image> ImagePtr;
 
-class Loader::Impl : public boost::signals::trackable {
+class Loader::Impl : public boost::signals2::trackable {
 public:
        ///
        Impl();
@@ -187,9 +187,9 @@ public:
        /// We modify a local copy of the image once it is loaded.
        ImagePtr image_;
        /// This signal is emitted when the image loading status changes.
-       boost::signal<void()> signal_;
+       boost::signals2::signal<void()> signal_;
        /// The connection of the signal StatusChanged  
-       boost::signals::connection sc_;
+       boost::signals2::connection sc_;
 
        double displayPixelRatio() const
        {
@@ -347,7 +347,7 @@ void Loader::setDisplayPixelRatio(double scale)
 }
 
 
-boost::signals::connection Loader::connect(slot_type const & slot) const
+boost::signals2::connection Loader::connect(slot_type const & slot) const
 {
        return pimpl_->signal_.connect(slot);
 }