diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-06 23:25:57 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-08 15:57:24 -0500 |
| commit | e0db54e89d6f4e9f56800ddb1017e30be1b7d58a (patch) | |
| tree | 5a5a88dcebf349bf92da9ba2be9e8de63dc3ab81 /lib/std/hash/crc.zig | |
| parent | 2a6fbbd8fba30b8d24aa966606372f595c102d55 (diff) | |
| download | zig-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.zig | 8 |
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]] ^ |
