From 49685c39895af67d7ffcc50fdc02150b6ee44f72 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 5 Apr 2022 22:01:53 -0400 Subject: 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 --- src/imgmanager.hpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/imgmanager.hpp') 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)>; using callback_type = sigc::slot)>; - 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 GetFromURLIfCached(std::string url); - Glib::RefPtr 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 GetPlaceholder(int size); private: - Glib::RefPtr ReadFileToPixbuf(std::string path); - Glib::RefPtr ReadFileToPixbufAnimation(std::string path, int w, int h); + static Glib::RefPtr ReadFileToPixbuf(std::string path); + static Glib::RefPtr ReadFileToPixbufAnimation(std::string path, int w, int h); mutable std::mutex m_load_mutex; void RunCallbacks(); -- cgit v1.2.3