From 93f764e1003bb6f35b56b7b91a73ae0ca80282c9 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 10 Aug 2024 18:50:45 +0200 Subject: refactor(ecs): create archetype lookup entries on-the-go --- ecs/src/relationship.rs | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'ecs/src/relationship.rs') diff --git a/ecs/src/relationship.rs b/ecs/src/relationship.rs index 964a47f..b7c5c02 100644 --- a/ecs/src/relationship.rs +++ b/ecs/src/relationship.rs @@ -14,7 +14,7 @@ use crate::entity::Uid as EntityUid; use crate::lock::{Lock, ReadGuard}; use crate::system::{ComponentRefMut, Input as SystemInput}; use crate::type_name::TypeName; -use crate::{World, WorldData}; +use crate::World; #[derive(Debug)] pub struct Relationship @@ -60,28 +60,6 @@ where { self } - - #[cfg_attr(feature = "debug", tracing::instrument(skip_all))] - fn prepare(world_data: &WorldData) - where - Self: Sized, - { - let mut component_storage_lock = world_data - .component_storage - .write_nonblock() - .expect("Failed to acquire read-write component storage lock"); - - #[cfg(feature = "debug")] - tracing::debug!( - "Adding archetypes lookup entry for component: {}", - std::any::type_name::() - ); - - component_storage_lock.add_archetype_lookup_entry([ComponentMetadata { - id: ComponentId::of::(), - is_optional: component_is_optional::().into(), - }]); - } } impl SystemInput for Relationship -- cgit v1.2.3-18-g5258