| 135 | } |
| 136 | |
| 137 | void ThumbnailCache::evict_missing(const std::vector<std::string>& live_names) { |
| 138 | const std::unordered_set<std::string> live(live_names.begin(), |
| 139 | live_names.end()); |
| 140 | std::erase_if(entries_, [&live, this](const auto& kv) { |
| 141 | if (!live.contains(kv.first)) { |
| 142 | if (kv.second.tex != 0) { |
| 143 | canvas_.glDeleteTextures(1, &kv.second.tex); |
| 144 | } |
| 145 | return true; |
| 146 | } |
| 147 | return false; |
| 148 | }); |
| 149 | } |
| 150 | |
| 151 | } // namespace oid::host |
no test coverage detected