From 67005faa7b36a04da1aa893f97af33cfda85c600 Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 9 Jul 2022 18:19:01 -0400 Subject: [PATCH] mark some getter methods inline --- libretrogd/src/graphics/bitmapatlas.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libretrogd/src/graphics/bitmapatlas.rs b/libretrogd/src/graphics/bitmapatlas.rs index 53ccabf..537fe19 100644 --- a/libretrogd/src/graphics/bitmapatlas.rs +++ b/libretrogd/src/graphics/bitmapatlas.rs @@ -92,11 +92,12 @@ impl BitmapAtlas { Ok(self.tiles.len() - 1) } - + pub fn clear(&mut self) { self.tiles.clear() } + #[inline] pub fn len(&self) -> usize { self.tiles.len() } @@ -106,6 +107,7 @@ impl BitmapAtlas { self.tiles.get(index) } + #[inline] pub fn bitmap(&self) -> &Bitmap { &self.bitmap } @@ -114,6 +116,7 @@ impl BitmapAtlas { impl Index for BitmapAtlas { type Output = Rect; + #[inline] fn index(&self, index: usize) -> &Self::Output { self.get(index).unwrap() }