aboutsummaryrefslogtreecommitdiff
path: root/lib/std/hash/crc.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-11-06 23:25:57 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-11-08 15:57:24 -0500
commite0db54e89d6f4e9f56800ddb1017e30be1b7d58a (patch)
tree5a5a88dcebf349bf92da9ba2be9e8de63dc3ab81 /lib/std/hash/crc.zig
parent2a6fbbd8fba30b8d24aa966606372f595c102d55 (diff)
downloadzig-e0db54e89d6f4e9f56800ddb1017e30be1b7d58a.tar.gz
zig-e0db54e89d6f4e9f56800ddb1017e30be1b7d58a.zip
update the codebase to use `@as`
Diffstat (limited to 'lib/std/hash/crc.zig')
-rw-r--r--lib/std/hash/crc.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/hash/crc.zig b/lib/std/hash/crc.zig
index cdcaf55610..6176ded81d 100644
--- a/lib/std/hash/crc.zig
+++ b/lib/std/hash/crc.zig
@@ -65,10 +65,10 @@ pub fn Crc32WithPoly(comptime poly: u32) type {
const p = input[i .. i + 8];
// Unrolling this way gives ~50Mb/s increase
- self.crc ^= (u32(p[0]) << 0);
- self.crc ^= (u32(p[1]) << 8);
- self.crc ^= (u32(p[2]) << 16);
- self.crc ^= (u32(p[3]) << 24);
+ self.crc ^= (@as(u32, p[0]) << 0);
+ self.crc ^= (@as(u32, p[1]) << 8);
+ self.crc ^= (@as(u32, p[2]) << 16);
+ self.crc ^= (@as(u32, p[3]) << 24);
self.crc =
lookup_tables[0][p[7]] ^