MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / AddArrayElement

Function AddArrayElement

src/luxcore/luxparser/luxparse.cpp:533–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531#define SA(r) ((const char **) r->array)
532
533void AddArrayElement(void *elem)
534{
535 if (curArray->nelems >= curArray->allocated) {
536 curArray->allocated = 2 * curArray->allocated + 1;
537 curArray->array = realloc(curArray->array,
538 curArray->allocated * curArray->elementSize);
539 }
540 char *next = static_cast<char *>(curArray->array) +
541 curArray->nelems * curArray->elementSize;
542 memcpy(next, elem, curArray->elementSize);
543 curArray->nelems++;
544}
545
546ParamArray *ArrayDup(ParamArray *ra)
547{

Callers 1

yyparseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected