allow inlining (this did not provide a statistically significant performance boost - oh well)

This commit is contained in:
2020-04-28 18:00:31 +01:00
parent dd00686de0
commit f899f03dbe
15 changed files with 56 additions and 2 deletions

View File

@@ -10,10 +10,12 @@ pub struct Tile {
}
impl Tile {
#[inline]
fn name_line(&self) -> String {
optional_data_line("NAME", self.name.as_ref())
}
#[inline]
fn wall_line(&self) -> String {
if self.wall.is_some() {
format!("\nWAL {}", self.wall.unwrap())
@@ -22,6 +24,7 @@ impl Tile {
}
}
#[inline]
fn colour_line(&self) -> String {
if self.colour_id.is_some() {
format!("\nCOL {}", self.colour_id.unwrap())