MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / HasExpiredDict

Function HasExpiredDict

src/PrefixMatch.cpp:84–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84bool HasExpiredDict(const CacheEntry& cached) {
85 if (cached.tables.expired()) {
86 return true;
87 }
88 for (const std::weak_ptr<const Dict>& dict : cached.dicts) {
89 if (dict.expired()) {
90 return true;
91 }
92 }
93 return false;
94}
95
96void PruneExpiredPrefixMatchCache(
97 std::unordered_map<std::string, std::vector<CacheEntry>>* cache) {

Callers 2

PrefixMatchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected