MCPcopy Create free account
hub / github.com/defold/defold / SaveArrayFunction

Function SaveArrayFunction

engine/ddf/src/ddf/ddf.cpp:456–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454 }
455
456 static bool SaveArrayFunction(void* context, const void* buffer, uint32_t buffer_size)
457 {
458 dmArray<uint8_t>* array = (dmArray<uint8_t>*) context;
459 if (array->Remaining() < buffer_size)
460 {
461 array->OffsetCapacity(buffer_size + 1024);
462 }
463
464 array->PushArray((uint8_t*) buffer, buffer_size);
465 return true;
466 }
467
468 Result SaveMessageToArray(const void* message, const Descriptor* desc, dmArray<uint8_t>& array)
469 {

Callers

nothing calls this directly

Calls 3

PushArrayMethod · 0.80
RemainingMethod · 0.45
OffsetCapacityMethod · 0.45

Tested by

no test coverage detected