fix incorrectly named things and add vtable to component trait

This commit is contained in:
bgkillas 2025-08-17 12:29:20 -04:00
parent 4b0f5d15cc
commit d8c64c4682
2 changed files with 362 additions and 36 deletions

View file

@ -161,12 +161,7 @@ impl ComponentBuffer {
type_id: usize,
) -> &'static mut C {
let com = C::default(ComponentData {
vtable: self
.component_list
.as_ref()
.iter()
.find_map(|a| unsafe { a.as_ref().map(|a| a.vtable) })
.unwrap_or(&ComponentVTable {}),
vtable: C::VTABLE,
local_id: self.component_list.len(),
type_name: C::C_NAME,
type_id,

File diff suppressed because it is too large Load diff