MCPcopy Create free account
hub / github.com/cococry/leif / props_stack_resize

Function props_stack_resize

leif.c:1653–1660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1651}
1652
1653void props_stack_resize(PropsStack* stack, uint32_t newcap) {
1654 LfUIElementProps* newdata = (LfUIElementProps*)realloc(stack->data, newcap * sizeof(LfUIElementProps));
1655 if(!newdata) {
1656 LF_ERROR("Failed to reallocate memory for stack datastructure.");
1657 }
1658 stack->data = newdata;
1659 stack->cap = newcap;
1660}
1661
1662void props_stack_push(PropsStack* stack, LfUIElementProps props) {
1663 if(stack->count == stack->cap) {

Callers 2

props_stack_pushFunction · 0.85
props_stack_popFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected