authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2021-01-02 01:10:47+11:00
committergravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2021-01-02 01:10:47+11:00
log03e2c53747a7eeb0d162f7b7fa7763fffdeba2d8
treea4282b2d44fd27ba1a3f4059ee17ba28bfda60b6
parent31ba9d569b14a3e147d9bdfe88d63a1ed134bc5f
signaturelock-open Commit is signed but in an unrecognized format.

Add workaround in PackedIntArray .initAllTo for #7635


1 files changed, 2 insertions(+), 1 deletions(-)

lib/std/packed_int_array.zig+2-1
......@@ -205,7 +205,8 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: builtin.Endian,
205205
206206 ///Initialize all entries of a packed array to the same value
207207 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 };
209210 self.setAll(int);
210211 return self;
211212 }