| 69 | } |
| 70 | |
| 71 | void PruneExpiredDictCache() { |
| 72 | std::unordered_map<std::string, std::weak_ptr<Dict>>& cache = DictCache(); |
| 73 | for (std::unordered_map<std::string, std::weak_ptr<Dict>>::iterator it = |
| 74 | cache.begin(); |
| 75 | it != cache.end();) { |
| 76 | if (it->second.expired()) { |
| 77 | it = cache.erase(it); |
| 78 | } else { |
| 79 | ++it; |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | bool GetFileCacheKey(const std::string& path, std::string* cacheKey) { |
| 85 | #if defined(_WIN32) || defined(_WIN64) |
no test coverage detected