diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-02-19 10:20:19 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-02-19 10:20:19 -0700 |
| commit | b5b634e4e8a2a1fe32fba50ccd175257b4213936 (patch) | |
| tree | 4eed625db81dd4d6907e386084df36ec3ac85687 /lib/std/packed_int_array.zig | |
| parent | efdc94c10712f610e7de5e49fd9cd6f88b4bbbae (diff) | |
| parent | 02f5d2673f1bb21e7329acdd664fed565ecd4317 (diff) | |
| download | zig-b5b634e4e8a2a1fe32fba50ccd175257b4213936.tar.gz zig-b5b634e4e8a2a1fe32fba50ccd175257b4213936.zip | |
Merge remote-tracking branch 'origin/master' into llvm16
Diffstat (limited to 'lib/std/packed_int_array.zig')
| -rw-r--r-- | lib/std/packed_int_array.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/packed_int_array.zig b/lib/std/packed_int_array.zig index f15ddbe974..449c2f487f 100644 --- a/lib/std/packed_int_array.zig +++ b/lib/std/packed_int_array.zig @@ -1,4 +1,4 @@ -//! An set of array and slice types that bit-pack integer elements. A normal [12]u3 +//! A set of array and slice types that bit-pack integer elements. A normal [12]u3 //! takes up 12 bytes of memory since u3's alignment is 1. PackedArray(u3, 12) only //! takes up 4 bytes of memory. @@ -215,7 +215,7 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: Endian, comptim /// or, more likely, an array literal. pub fn init(ints: [int_count]Int) Self { var self = @as(Self, undefined); - for (ints) |int, i| self.set(i, int); + for (ints, 0..) |int, i| self.set(i, int); return self; } |
