summaryrefslogtreecommitdiff
path: root/ecs/src/query.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/query.rs
parentb4be1c1e9a7e69a86a5aa9be6699847edc2c8d0f (diff)
refactor(ecs): create archetype lookup entries on-the-go
Diffstat (limited to 'ecs/src/query.rs')
-rw-r--r--ecs/src/query.rs23
1 files changed, 1 insertions, 22 deletions
diff --git a/ecs/src/query.rs b/ecs/src/query.rs
index 60d4210..ea61640 100644
--- a/ecs/src/query.rs
+++ b/ecs/src/query.rs
@@ -20,7 +20,7 @@ use crate::system::{
Param as SystemParam,
System,
};
-use crate::{World, WorldData};
+use crate::World;
pub mod options;
@@ -138,27 +138,6 @@ where
{
Box::new(QueryComponentIds { component_ids: Comps::metadata() })
}
-
- #[cfg_attr(feature = "debug", tracing::instrument(skip_all))]
- fn prepare(world_data: &WorldData)
- {
- 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 components: ({})",
- std::any::type_name::<Comps>()
- );
-
- component_storage_lock.add_archetype_lookup_entry(Comps::metadata());
-
- drop(component_storage_lock);
-
- Comps::prepare(world_data);
- }
}
type ComponentIterMapFn = for<'a> fn(&'a Archetype) -> EntityIter<'a>;