diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-04-05 22:01:53 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-04-05 22:01:53 -0400 |
commit | 49685c39895af67d7ffcc50fdc02150b6ee44f72 (patch) | |
tree | 5c5c262f95a30e58582a285b467d05954ff5f35c /src/imgmanager.hpp | |
parent | 9767e1e7fdef9262211ec676b4f0d4c30ff10649 (diff) | |
download | abaddon-portaudio-49685c39895af67d7ffcc50fdc02150b6ee44f72.tar.gz abaddon-portaudio-49685c39895af67d7ffcc50fdc02150b6ee44f72.zip |
fix up a bunch of clang-tidy stuff
mostly changing references, which i hope doesnt break stuff with models (TreeRow, iterators) since they gave me some strange problems in the past
Diffstat (limited to 'src/imgmanager.hpp')
-rw-r--r-- | src/imgmanager.hpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/imgmanager.hpp b/src/imgmanager.hpp index eb8a590..63c604e 100644 --- a/src/imgmanager.hpp +++ b/src/imgmanager.hpp @@ -13,19 +13,16 @@ public: using callback_anim_type = sigc::slot<void(Glib::RefPtr<Gdk::PixbufAnimation>)>; using callback_type = sigc::slot<void(Glib::RefPtr<Gdk::Pixbuf>)>; - Cache &GetCache(); void ClearCache(); - void LoadFromURL(std::string url, callback_type cb); + void LoadFromURL(const std::string &url, const callback_type &cb); // animations need dimensions before loading since there is no (easy) way to scale a PixbufAnimation - void LoadAnimationFromURL(std::string url, int w, int h, callback_anim_type cb); - void Prefetch(std::string url); - Glib::RefPtr<Gdk::Pixbuf> GetFromURLIfCached(std::string url); - Glib::RefPtr<Gdk::PixbufAnimation> GetAnimationFromURLIfCached(std::string url, int w, int h); + void LoadAnimationFromURL(const std::string &url, int w, int h, const callback_anim_type &cb); + void Prefetch(const std::string &url); Glib::RefPtr<Gdk::Pixbuf> GetPlaceholder(int size); private: - Glib::RefPtr<Gdk::Pixbuf> ReadFileToPixbuf(std::string path); - Glib::RefPtr<Gdk::PixbufAnimation> ReadFileToPixbufAnimation(std::string path, int w, int h); + static Glib::RefPtr<Gdk::Pixbuf> ReadFileToPixbuf(std::string path); + static Glib::RefPtr<Gdk::PixbufAnimation> ReadFileToPixbufAnimation(std::string path, int w, int h); mutable std::mutex m_load_mutex; void RunCallbacks(); |