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

Function SameDicts

src/PrefixMatch.cpp:71–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71bool SameDicts(const CacheEntry& cached,
72 const std::vector<std::weak_ptr<const Dict>>& current) {
73 if (cached.dicts.size() != current.size()) {
74 return false;
75 }
76 for (size_t i = 0; i < current.size(); i++) {
77 if (cached.dicts[i].expired() || !SameOwner(cached.dicts[i], current[i])) {
78 return false;
79 }
80 }
81 return true;
82}
83
84bool HasExpiredDict(const CacheEntry& cached) {
85 if (cached.tables.expired()) {

Callers 1

PrefixMatchMethod · 0.85

Calls 2

SameOwnerFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected