fix: improve types of heap allocated arrays

This commit is contained in:
2021-03-16 22:51:41 -05:00
parent 528b88eeb7
commit 06821bf880
4 changed files with 12 additions and 12 deletions

View File

@@ -30,7 +30,7 @@ impl Cartridge {
MBCKind::None => todo!("Handle no MBC Situation"),
MBCKind::MBC1 => MBC1 {
ram_size,
ram: vec![0; ram_byte_count as usize].into_boxed_slice(),
ram: vec![0; ram_byte_count as usize],
bank_count,
..Default::default()
},
@@ -90,7 +90,7 @@ struct MBC1 {
current_ram_bank: u8, // 2-bit number
mode: bool,
ram_size: RamSize,
ram: Box<[u8]>,
ram: Vec<u8>,
bank_count: BankCount,
ram_enabled: bool,
}