From fe2e480f28c036ab1049ca4006ff73e042c91766 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sat, 8 Oct 2022 17:13:25 +0100 Subject: [PATCH] Remove pointless casts --- agb/src/display/tiled/map.rs | 2 +- agb/src/display/tiled/vram_manager.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agb/src/display/tiled/map.rs b/agb/src/display/tiled/map.rs index 9abe79a8..c094e966 100644 --- a/agb/src/display/tiled/map.rs +++ b/agb/src/display/tiled/map.rs @@ -40,7 +40,7 @@ trait TiledMapPrivate: TiledMapTypes { unsafe { MemoryMapped::new(0x0400_0008 + 2 * self.background_id()) } } 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 } } diff --git a/agb/src/display/tiled/vram_manager.rs b/agb/src/display/tiled/vram_manager.rs index 6b3dbf43..3464f54e 100644 --- a/agb/src/display/tiled/vram_manager.rs +++ b/agb/src/display/tiled/vram_manager.rs @@ -333,7 +333,7 @@ impl VRamManager { pub(crate) fn gc(&mut self) { 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 { continue; // it has since been added back }