rust/mapgen/src/theme.rs
branchtransitional_engine
changeset 15944 c571d4b8879c
parent 15141 febccab419b1
child 16004 2146cb7be36f
--- a/rust/mapgen/src/theme.rs	Wed Feb 01 10:58:45 2023 +0100
+++ b/rust/mapgen/src/theme.rs	Wed Feb 01 11:19:45 2023 +0100
@@ -47,7 +47,7 @@
 
     pub fn to_transposed(&self) -> ThemeSprite {
         let size = self.size().transpose();
-        let mut pixels = Vec2D::new(size, 0u32);
+        let mut pixels = Vec2D::new(&size, 0u32);
         for (y, row) in self.pixels.rows().enumerate() {
             for (x, v) in row.iter().enumerate() {
                 pixels[x][y] = *v;
@@ -179,7 +179,7 @@
     }
     let size = Size::new(info.width as usize, info.height as usize);
 
-    let mut pixels: Vec2D<u32> = Vec2D::new(size, 0);
+    let mut pixels: Vec2D<u32> = Vec2D::new(&size, 0);
     reader.next_frame(slice_u32_to_u8_mut(pixels.as_mut_slice()))?;
 
     Ok(ThemeSprite { pixels })