From e6d8bea236dd0097adb1c22e9a23d95102ebe9d9 Mon Sep 17 00:00:00 2001 From: peterc-s Date: Wed, 23 Oct 2024 13:01:13 +0100 Subject: [PATCH] Remove redundant constant --- src/animations/Doom.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/animations/Doom.zig b/src/animations/Doom.zig index 942acab..8d410e2 100644 --- a/src/animations/Doom.zig +++ b/src/animations/Doom.zig @@ -97,10 +97,10 @@ pub fn draw(self: Doom) void { } fn initBuffer(buffer: []u8, width: usize) void { - const length = buffer.len; - const slice_start = buffer[0..length]; - const slice_end = buffer[length - width .. length]; + const slice_start = buffer[0..buffer.len]; + const slice_end = buffer[buffer.len - width .. buffer.len]; + // set cell initial values to 0, set bottom row to be fire sources @memset(slice_start, 0); @memset(slice_end, STEPS - 1); }