summaryrefslogtreecommitdiff
path: root/ecs/src/relationship.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-08-10 18:50:45 +0200
committerHampusM <hampus@hampusmat.com>2024-08-10 20:56:39 +0200
commit93f764e1003bb6f35b56b7b91a73ae0ca80282c9 (patch)
tree1765bd3ba2e61783e3477211eb84550726e0b7d9 /ecs/src/relationship.rs
parentb4be1c1e9a7e69a86a5aa9be6699847edc2c8d0f (diff)
refactor(ecs): create archetype lookup entries on-the-go
Diffstat (limited to 'ecs/src/relationship.rs')
-rw-r--r--ecs/src/relationship.rs24
1 files changed, 1 insertions, 23 deletions
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<Kind, ComponentT: Component>
@@ -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::<ComponentT>()
- );
-
- component_storage_lock.add_archetype_lookup_entry([ComponentMetadata {
- id: ComponentId::of::<ComponentT>(),
- is_optional: component_is_optional::<ComponentT>().into(),
- }]);
- }
}
impl<Kind, ComponentT> SystemInput for Relationship<Kind, ComponentT>