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

Function props_stack_pop

leif.c:1669–1676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1667}
1668
1669LfUIElementProps props_stack_pop(PropsStack* stack) {
1670 LF_ASSERT(stack.count != 0, "Stack underflow on stack data structure!");
1671 LfUIElementProps val = stack->data[--stack->count];
1672 if(stack->count > 0 && stack->count == stack->cap / 4) {
1673 props_stack_resize(stack, stack->cap / 2);
1674 }
1675 return val;
1676}
1677
1678LfUIElementProps props_stack_peak(PropsStack* stack) {
1679 LF_ASSERT(stack.count != 0, "Stack is empty on stack data structure!");

Callers 1

lf_pop_style_propsFunction · 0.85

Calls 1

props_stack_resizeFunction · 0.85

Tested by

no test coverage detected