| ... | @@ -205,7 +205,8 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: builtin.Endian, | ... | @@ -205,7 +205,8 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: builtin.Endian, |
| 205 | | 205 | |
| 206 | ///Initialize all entries of a packed array to the same value | 206 | ///Initialize all entries of a packed array to the same value |
| 207 | pub fn initAllTo(int: Int) Self { | 207 | pub fn initAllTo(int: Int) Self { |
| 208 | var self = @as(Self, undefined); | 208 | // TODO: use `var self = @as(Self, undefined);` https://github.com/ziglang/zig/issues/7635 |
| | 209 | var self = Self{ .bytes = [_]u8{0} ** total_bytes }; |
| 209 | self.setAll(int); | 210 | self.setAll(int); |
| 210 | return self; | 211 | return self; |
| 211 | } | 212 | } |