diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-12-07 19:04:41 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-12-07 19:04:41 +0100 |
commit | 9a5412b692ec79a2688998db2f7b554e829e3278 (patch) | |
tree | eb3a288d465955c03f1c4b61f9c3376d1b4c86aa /include | |
parent | a213862c5e34116890e210eda71ea04758149f98 (diff) |
Cache thumbnails until they are no longer needed
Diffstat (limited to 'include')
-rw-r--r-- | include/Body.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<sf::Texture> texture; }; Program *program; std::shared_ptr<sf::Texture> load_thumbnail_from_url(const std::string &url); - std::vector<ThumbnailData> item_thumbnail_textures; + std::unordered_map<std::string, ThumbnailData> item_thumbnail_textures; bool loading_thumbnail; }; }
\ No newline at end of file |