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

Function toGlyphVec

snap_drawing/test/src/TextShaperCache_tests.cpp:8–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace snap::drawing {
7
8static std::vector<ShapedGlyph> toGlyphVec(const ShapedGlyph* glyphs, size_t length) {
9 std::vector<ShapedGlyph> out;
10 out.reserve(length);
11
12 for (size_t i = 0; i < length; i++) {
13 out.emplace_back() = glyphs[i];
14 }
15
16 return out;
17}
18
19static std::vector<ShapedGlyph> generateGlyphVec(const Character* characters, size_t length) {
20 std::vector<ShapedGlyph> out;

Callers 1

TESTFunction · 0.85

Calls 1

reserveMethod · 0.45

Tested by

no test coverage detected