MCPcopy Create free account
hub / github.com/Samsung/rlottie / encode_c_string

Method encode_c_string

src/vector/vdebug.cpp:308–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308void VDebug::encode_c_string(char const* arg, size_t length)
309{
310 if (length == 0) return;
311
312 resize_buffer_if_needed(1 + length + 1);
313 char* b = buffer();
314 auto type_id = TupleIndex<char*, SupportedTypes>::value;
315 *reinterpret_cast<uint8_t*>(b++) = static_cast<uint8_t>(type_id);
316 memcpy(b, arg, length + 1);
317 m_bytes_used += 1 + length + 1;
318}
319
320void VDebug::encode(string_literal_t arg)
321{

Callers

nothing calls this directly

Calls 1

bufferFunction · 0.85

Tested by

no test coverage detected