rust/landgen/src/wavefront_collapse/tile_image.rs
branchtransitional_engine
changeset 15924 9502611bffc1
parent 15921 5f00829c55ec
--- a/rust/landgen/src/wavefront_collapse/tile_image.rs	Mon Feb 13 17:02:08 2023 +0100
+++ b/rust/landgen/src/wavefront_collapse/tile_image.rs	Tue Feb 14 08:52:20 2023 +0100
@@ -11,6 +11,7 @@
 }
 
 impl<I: PartialEq + Clone> Edge<I> {
+    #[inline]
     pub fn new(id: I, symmetrical: bool) -> Self {
         Self {
             id,
@@ -19,6 +20,7 @@
         }
     }
 
+    #[inline]
     pub fn reversed(&self) -> Self {
         Self {
             id: self.id.clone(),
@@ -27,6 +29,7 @@
         }
     }
 
+    #[inline]
     pub fn is_compatible(&self, other: &Self) -> bool {
         self.id == other.id && ((self.reverse != other.reverse) || self.symmetrical)
     }
@@ -115,22 +118,27 @@
         }
     }
 
+    #[inline]
     pub fn right_edge(&self) -> &Edge<I> {
         &self.right
     }
 
+    #[inline]
     pub fn bottom_edge(&self) -> &Edge<I> {
         &self.bottom
     }
 
+    #[inline]
     pub fn left_edge(&self) -> &Edge<I> {
         &self.left
     }
 
+    #[inline]
     pub fn top_edge(&self) -> &Edge<I> {
         &self.top
     }
 
+    #[inline]
     pub fn size(&self) -> Size {
         match self.transform {
             Transform::Rotate0(_) => self.image.size(),
@@ -138,6 +146,7 @@
         }
     }
 
+    #[inline]
     pub fn get(&self, row: usize, column: usize) -> Option<&T> {
         match self.transform {
             Transform::Rotate0(_) => {