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

Function unmarshallBinary

valdi_core/src/valdi_core/cpp/Utils/BridgeObject.cpp:120–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120std::vector<uint8_t> unmarshallBinary(const Value& value, const Ref<BridgeContext>& bridgeContext) {
121 auto typedArray = value.checkedTo<Ref<ValueTypedArray>>(*bridgeContext);
122 if (typedArray == nullptr) {
123 return {};
124 }
125
126 const auto& buffer = typedArray->getBuffer();
127
128 std::vector<uint8_t> out;
129 out.insert(out.begin(), buffer.begin(), buffer.end());
130 return out;
131}
132
133} // namespace Valdi

Callers

nothing calls this directly

Calls 3

insertMethod · 0.65
endMethod · 0.65
beginMethod · 0.45

Tested by

no test coverage detected