Skip to content

Commit

Permalink
Refactor ComponentStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
LechintanTudor committed Dec 30, 2023
1 parent b304358 commit a736c5c
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 184 deletions.
2 changes: 1 addition & 1 deletion src/components/component_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ macro_rules! impl_component_set {

unsafe {
storages.ungroup_families(family_mask, group_mask, entity);
$((*storage_ptrs.$idx).delete_typed::<$comp>(entity);)+
$((*storage_ptrs.$idx).delete::<$comp>(entity);)+
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ unsafe fn group_components(
let dense = storage.sparse().get_sparse_unchecked(sparse);

if dense != swap_index {
storage.swap_nonoverlapping(dense, swap_index);
storage.swap(dense, swap_index);
}
});

Expand All @@ -360,7 +360,7 @@ unsafe fn ungroup_components(
let dense = storage.sparse().get_sparse_unchecked(sparse);

if dense != swap_index {
storage.swap_nonoverlapping(dense, swap_index);
storage.swap(dense, swap_index);
}
});
}
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![allow(clippy::module_inception)]
#![allow(clippy::needless_doctest_main)]
#![allow(clippy::unused_unit)]
#![forbid(missing_docs)]
// #![forbid(missing_docs)]

//! Sparsey is a sparse set-based Entity Component System.
//!
Expand Down
Loading

0 comments on commit a736c5c

Please sign in to comment.