diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-04 15:31:39 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-04 15:31:39 -0400 |
commit | 69c4b0c948b6c141c9d251f20a973be064ab0087 (patch) | |
tree | f5fe4b0a63bd69d4d5078103c5de2f623a5fd5f6 /imgmanager.hpp | |
parent | 77fc962de4fbf6c21b76c8e4a43390b879315b10 (diff) | |
download | abaddon-portaudio-69c4b0c948b6c141c9d251f20a973be064ab0087.tar.gz abaddon-portaudio-69c4b0c948b6c141c9d251f20a973be064ab0087.zip |
use sigc in imgmanager to hopefully get rid of some lifetime errors
Diffstat (limited to 'imgmanager.hpp')
-rw-r--r-- | imgmanager.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/imgmanager.hpp b/imgmanager.hpp index 800d6a2..c7e2119 100644 --- a/imgmanager.hpp +++ b/imgmanager.hpp @@ -10,7 +10,7 @@ class ImageManager { public: ImageManager(); - using callback_type = std::function<void(Glib::RefPtr<Gdk::Pixbuf>)>; + using callback_type = sigc::slot<void(Glib::RefPtr<Gdk::Pixbuf>)>; Cache &GetCache(); void LoadFromURL(std::string url, callback_type cb); @@ -24,7 +24,7 @@ private: void RunCallbacks(); Glib::Dispatcher m_cb_dispatcher; mutable std::mutex m_cb_mutex; - std::queue<std::pair<Glib::RefPtr<Gdk::Pixbuf>, callback_type>> m_cb_queue; + std::queue<std::function<void()>> m_cb_queue; std::unordered_map<std::string, Glib::RefPtr<Gdk::Pixbuf>> m_pixs; Cache m_cache; |