diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-08-21 17:24:04 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-08-22 11:19:20 +0300 |
| commit | 62ff8871ed9c8c4e46d8acd1d227ed3fb802be7f (patch) | |
| tree | b5bdd3f092ebc0b7e9c260df798b7019f69cdae7 /lib/std/packed_int_array.zig | |
| parent | 6c020cdb767192757b6c4b43e2f14c5394760431 (diff) | |
| download | zig-62ff8871ed9c8c4e46d8acd1d227ed3fb802be7f.tar.gz zig-62ff8871ed9c8c4e46d8acd1d227ed3fb802be7f.zip | |
stage2+stage1: remove type parameter from bit builtins
Closes #12529
Closes #12511
Closes #6835
Diffstat (limited to 'lib/std/packed_int_array.zig')
| -rw-r--r-- | lib/std/packed_int_array.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/packed_int_array.zig b/lib/std/packed_int_array.zig index a07fc13af1..902e3ee19c 100644 --- a/lib/std/packed_int_array.zig +++ b/lib/std/packed_int_array.zig @@ -76,7 +76,7 @@ pub fn PackedIntIo(comptime Int: type, comptime endian: Endian) type { const value_ptr = @ptrCast(*align(1) const Container, &bytes[start_byte]); var value = value_ptr.*; - if (endian != native_endian) value = @byteSwap(Container, value); + if (endian != native_endian) value = @byteSwap(value); switch (endian) { .Big => { @@ -126,7 +126,7 @@ pub fn PackedIntIo(comptime Int: type, comptime endian: Endian) type { const target_ptr = @ptrCast(*align(1) Container, &bytes[start_byte]); var target = target_ptr.*; - if (endian != native_endian) target = @byteSwap(Container, target); + if (endian != native_endian) target = @byteSwap(target); //zero the bits we want to replace in the existing bytes const inv_mask = @intCast(Container, std.math.maxInt(UnInt)) << keep_shift; @@ -136,7 +136,7 @@ pub fn PackedIntIo(comptime Int: type, comptime endian: Endian) type { //merge the new value target |= value; - if (endian != native_endian) target = @byteSwap(Container, target); + if (endian != native_endian) target = @byteSwap(target); //save it back target_ptr.* = target; |
