Remove pointless casts

This commit is contained in:
Gwilym Kuiper 2022-10-08 17:13:25 +01:00
parent faed7b456f
commit fe2e480f28
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ trait TiledMapPrivate: TiledMapTypes {
unsafe { MemoryMapped::new(0x0400_0008 + 2 * self.background_id()) } unsafe { MemoryMapped::new(0x0400_0008 + 2 * self.background_id()) }
} }
fn screenblock_memory(&self) -> *mut u16 { fn screenblock_memory(&self) -> *mut u16 {
(0x0600_0000 + 0x1000 * self.screenblock() as usize / 2) as *mut u16 (0x0600_0000 + 0x1000 * self.screenblock() / 2) as *mut u16
} }
} }

View file

@ -333,7 +333,7 @@ impl VRamManager {
pub(crate) fn gc(&mut self) { pub(crate) fn gc(&mut self) {
for tile_index in self.indices_to_gc.drain(..) { for tile_index in self.indices_to_gc.drain(..) {
let key = tile_index.refcount_key() as usize; let key = tile_index.refcount_key();
if self.reference_counts[key].current_count() > 0 { if self.reference_counts[key].current_count() > 0 {
continue; // it has since been added back continue; // it has since been added back
} }