MCPcopy Create free account
hub / github.com/Snapchat/Valdi / find

Method find

snap_drawing/src/snap_drawing/cpp/Text/TextShaperCache.cpp:122–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122std::optional<TextShaperCacheValue> TextShaperCache::find(const TextShaperCacheKey& key) {
123 const auto& it = _cache.find(key);
124 if (it == _cache.end()) {
125 return std::nullopt;
126 }
127
128 return {it->value()};
129}
130
131void TextShaperCache::insert(const TextShaperCacheKey& key, const ShapedGlyph* glyphs, size_t glyphsLength) {
132 auto node = TextShaperCacheNode::make(key.fontId,

Calls 2

endMethod · 0.65
valueMethod · 0.65

Tested by 2

TESTFunction · 0.36