Skip to content

Commit

Permalink
Rename EntityId to EntityIndex (#6732)
Browse files Browse the repository at this point in the history
Continuation of #6107

Co-authored-by: devil-ira <[email protected]>
  • Loading branch information
tim-blackbird and tim-blackbird committed Nov 22, 2022
1 parent c069c54 commit a1607b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/bevy_ecs/src/storage/sparse_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
use bevy_ptr::{OwningPtr, Ptr};
use std::{cell::UnsafeCell, hash::Hash, marker::PhantomData};

type EntityId = u32;
type EntityIndex = u32;

#[derive(Debug)]
pub(crate) struct SparseArray<I, V = I> {
Expand Down Expand Up @@ -102,14 +102,14 @@ impl<I: SparseSetIndex, V> SparseArray<I, V> {
#[derive(Debug)]
pub struct ComponentSparseSet {
dense: Column,
// Internally this only relies on the Entity ID to keep track of where the component data is
// Internally this only relies on the Entity index to keep track of where the component data is
// stored for entities that are alive. The generation is not required, but is stored
// in debug builds to validate that access is correct.
#[cfg(not(debug_assertions))]
entities: Vec<EntityId>,
entities: Vec<EntityIndex>,
#[cfg(debug_assertions)]
entities: Vec<Entity>,
sparse: SparseArray<EntityId, u32>,
sparse: SparseArray<EntityIndex, u32>,
}

impl ComponentSparseSet {
Expand Down

0 comments on commit a1607b8

Please sign in to comment.