From 69721c06a897d7b33f7f3591abfe0e72571ab810 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sun, 19 Mar 2023 08:43:19 +0100 Subject: [PATCH] core: Make BitmapData::set_pixel32_raw inline --- core/src/bitmap/bitmap_data.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/bitmap/bitmap_data.rs b/core/src/bitmap/bitmap_data.rs index 2e6a498a5..d22612807 100644 --- a/core/src/bitmap/bitmap_data.rs +++ b/core/src/bitmap/bitmap_data.rs @@ -629,9 +629,9 @@ impl<'gc> BitmapData<'gc> { self.set_pixel32(x as i32, y as i32, color.with_alpha(current_alpha)); } + #[inline] pub fn set_pixel32_raw(&mut self, x: u32, y: u32, color: Color) { - let width = self.width(); - self.pixels[(x + y * width) as usize] = color; + self.pixels[(x + y * self.width) as usize] = color; } pub fn set_pixel32(&mut self, x: i32, y: i32, color: Color) {