mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
make map length getter use length field
This commit is contained in:
parent
525b5dfba2
commit
fb56e2f1d9
2 changed files with 9 additions and 4 deletions
|
@ -509,10 +509,10 @@ impl<K: 'static, V: 'static> StdMap<K, V> {
|
|||
}
|
||||
}
|
||||
pub fn len(&self) -> usize {
|
||||
self.iter().count()
|
||||
self.len
|
||||
}
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.iter().next().is_none()
|
||||
self.len == 0
|
||||
}
|
||||
pub fn iter_keys(&self) -> impl Iterator<Item = &'static K> {
|
||||
self.iter().map(|(k, _)| k)
|
||||
|
|
|
@ -422,17 +422,22 @@ impl BitSet<8> {
|
|||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Debug)]
|
||||
pub struct ComponentSystemManager {
|
||||
pub update_order: StdVec<&'static ComponentSystem>,
|
||||
pub component_updaters: StdVec<&'static ComponentUpdater>,
|
||||
pub map: StdMap<StdString, [*const usize; 4]>,
|
||||
pub component_vtables: StdMap<StdString, ComponentLuaVTable>,
|
||||
pub unk: [*const usize; 8],
|
||||
pub unk2: StdVec<*const usize>,
|
||||
pub unk3: [*const usize; 7],
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug)]
|
||||
pub struct ComponentLuaVTable {
|
||||
unk: [*const usize; 16],
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug)]
|
||||
pub struct ComponentUpdater {
|
||||
pub vtable: &'static ComponentUpdaterVTable,
|
||||
pub name: StdString,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue