mark some getter methods inline
This commit is contained in:
parent
0ccc37420d
commit
67005faa7b
|
@ -92,11 +92,12 @@ impl BitmapAtlas {
|
||||||
|
|
||||||
Ok(self.tiles.len() - 1)
|
Ok(self.tiles.len() - 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clear(&mut self) {
|
pub fn clear(&mut self) {
|
||||||
self.tiles.clear()
|
self.tiles.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
self.tiles.len()
|
self.tiles.len()
|
||||||
}
|
}
|
||||||
|
@ -106,6 +107,7 @@ impl BitmapAtlas {
|
||||||
self.tiles.get(index)
|
self.tiles.get(index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn bitmap(&self) -> &Bitmap {
|
pub fn bitmap(&self) -> &Bitmap {
|
||||||
&self.bitmap
|
&self.bitmap
|
||||||
}
|
}
|
||||||
|
@ -114,6 +116,7 @@ impl BitmapAtlas {
|
||||||
impl Index<usize> for BitmapAtlas {
|
impl Index<usize> for BitmapAtlas {
|
||||||
type Output = Rect;
|
type Output = Rect;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn index(&self, index: usize) -> &Self::Output {
|
fn index(&self, index: usize) -> &Self::Output {
|
||||||
self.get(index).unwrap()
|
self.get(index).unwrap()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue