From a1607b8065f4c8a97f763093d2204d5e9dde9e93 Mon Sep 17 00:00:00 2001 From: ira Date: Tue, 22 Nov 2022 20:38:35 +0000 Subject: [PATCH] Rename `EntityId` to `EntityIndex` (#6732) Continuation of #6107 Co-authored-by: devil-ira --- crates/bevy_ecs/src/storage/sparse_set.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/bevy_ecs/src/storage/sparse_set.rs b/crates/bevy_ecs/src/storage/sparse_set.rs index 34844432504e0..810a4fe569da2 100644 --- a/crates/bevy_ecs/src/storage/sparse_set.rs +++ b/crates/bevy_ecs/src/storage/sparse_set.rs @@ -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 { @@ -102,14 +102,14 @@ impl SparseArray { #[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, + entities: Vec, #[cfg(debug_assertions)] entities: Vec, - sparse: SparseArray, + sparse: SparseArray, } impl ComponentSparseSet {