def checked_bounds

bendvy-ecs-core@0.1.0.3 · entity_allocator.bend:44

import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as EntityAllocator
import Base
import entity_key.bend as K

44def checked_bounds(allowed:Bool,allocator:Allocator,+key:K.Key,mode:U32) -> Allocator & Bool:
45  match allowed allocator:
46    case False{} allocator:(allocator,False{})
47    case True{} Allocator{+next,+high,slots,+capacity,+depth,+free,+order}:checked_slot(key,mode,next,high,capacity,depth,free,order,Array.get(Slot,slots,K.index(key)))

Uses (10)

Used by (1)