mirror of
https://github.com/italicsjenga/agb.git
synced 2025-02-23 22:58:18 +11:00
further satisfy linter
This commit is contained in:
parent
298fbfb4be
commit
8b55a63ca9
1 changed files with 1 additions and 3 deletions
|
@ -134,9 +134,7 @@ impl Background<'_> {
|
||||||
fn map_get(&self, x: i32, y: i32, default: u16) -> u16 {
|
fn map_get(&self, x: i32, y: i32, default: u16) -> u16 {
|
||||||
let map = self.map.unwrap();
|
let map = self.map.unwrap();
|
||||||
|
|
||||||
if x >= self.map_dim_x as i32 || x < 0 {
|
if x >= self.map_dim_x as i32 || x < 0 || y >= self.map_dim_y as i32 || y < 0 {
|
||||||
default
|
|
||||||
} else if y >= self.map_dim_y as i32 || y < 0 {
|
|
||||||
default
|
default
|
||||||
} else {
|
} else {
|
||||||
map[(self.map_dim_x as i32 * y + x) as usize]
|
map[(self.map_dim_x as i32 * y + x) as usize]
|
||||||
|
|
Loading…
Add table
Reference in a new issue