From de13584be27a0c470786a6d225b080d34b97de07 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 14 Oct 2020 16:00:08 +0100 Subject: [PATCH] Add #no_bounds_check to crc procedures --- core/hash/crc.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/hash/crc.odin b/core/hash/crc.odin index 5b1e50a17..008310408 100644 --- a/core/hash/crc.odin +++ b/core/hash/crc.odin @@ -1,13 +1,13 @@ package hash -crc32 :: proc(data: []byte) -> u32 { +crc32 :: proc(data: []byte) -> u32 #no_bounds_check { result := ~u32(0); for b in data { result = result>>8 ~ _crc32_table[(result ~ u32(b)) & 0xff]; } return ~result; } -crc64 :: proc(data: []byte) -> u64 { +crc64 :: proc(data: []byte) -> u64 #no_bounds_check { result := ~u64(0); for b in data { result = result>>8 ~ _crc64_table[(result ~ u64(b)) & 0xff];