From cd32eab01d731c7ec16fd8060a1ebc7bfe4585c2 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 2 Jan 2025 15:29:02 +0100 Subject: refactor(ecs): rename find_entities to iter_archetypes_with_comps --- ecs/src/component/storage.rs | 2 +- ecs/src/query.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ecs/src/component/storage.rs b/ecs/src/component/storage.rs index cb219f1..e939ba7 100644 --- a/ecs/src/component/storage.rs +++ b/ecs/src/component/storage.rs @@ -27,7 +27,7 @@ pub struct Storage impl Storage { - pub fn find_entities( + pub fn iter_archetypes_with_comps( &self, mut comp_metadata_list: CompMetadataList, ) -> ArchetypeRefIter<'_> diff --git a/ecs/src/query.rs b/ecs/src/query.rs index c4b4cf0..3905fb8 100644 --- a/ecs/src/query.rs +++ b/ecs/src/query.rs @@ -50,7 +50,7 @@ where world: self.world, entities: self .component_storage - .find_entities(Comps::metadata()) + .iter_archetypes_with_comps(Comps::metadata()) .map( (|archetype| { repeat_n(archetype, archetype.entity_cnt()) @@ -75,7 +75,7 @@ where world: self.world, entities: self .component_storage - .find_entities(Comps::metadata()) + .iter_archetypes_with_comps(Comps::metadata()) .map( (|archetype| { repeat_n(archetype, archetype.entity_cnt()) @@ -107,7 +107,7 @@ where world: self.world, entities: self .component_storage - .find_entities( + .iter_archetypes_with_comps( Comps::metadata() .into_iter() .chain(extra_components) @@ -131,7 +131,7 @@ where { Some( self.component_storage - .find_entities(Comps::metadata()) + .iter_archetypes_with_comps(Comps::metadata()) .flat_map(|archetype| archetype.entities()) .filter(|entity| OptionsT::entity_filter(entity.components())) .nth(entity_index)? -- cgit v1.2.3-18-g5258