Add EntityIndex::EMPTY

wip/graph
copygirl 2 months ago
parent a4088ed2d3
commit 017ff31790
  1. 4
      src/ecs/entity_index.rs

@ -58,8 +58,10 @@ pub struct EntityIndex<T: Copy + Default> {
}
impl<T: Copy + Default> EntityIndex<T> {
pub const EMPTY: EntityIndex<T> = Self::new();
#[must_use]
pub fn new() -> Self {
pub const fn new() -> Self {
Self {
dense: Vec::new(),
alive_count: 0,

Loading…
Cancel
Save