From 9a5412b692ec79a2688998db2f7b554e829e3278 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 7 Dec 2019 19:04:41 +0100 Subject: Cache thumbnails until they are no longer needed --- include/Body.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/Body.hpp') diff --git a/include/Body.hpp b/include/Body.hpp index a485aac..35928cb 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -76,12 +76,12 @@ namespace QuickMedia { bool draw_thumbnails; private: struct ThumbnailData { - std::string url; + bool referenced; std::shared_ptr texture; }; Program *program; std::shared_ptr load_thumbnail_from_url(const std::string &url); - std::vector item_thumbnail_textures; + std::unordered_map item_thumbnail_textures; bool loading_thumbnail; }; } \ No newline at end of file -- cgit v1.2.3