| ... | @@ -332,8 +332,8 @@ test "PackedIntArray" { | ... | @@ -332,8 +332,8 @@ test "PackedIntArray" { |
| 332 | comptime var bits = 0; | 332 | comptime var bits = 0; |
| 333 | inline while (bits <= max_bits) : (bits += 1) { | 333 | inline while (bits <= max_bits) : (bits += 1) { |
| 334 | //alternate unsigned and signed | 334 | //alternate unsigned and signed |
| 335 | const even = bits % 2 == 0; | 335 | const sign: std.meta.Signedness = if (bits % 2 == 0) .signed else .unsigned; |
| 336 | const I = std.meta.Int(even, bits); | 336 | const I = std.meta.Int(sign, bits); |
| 337 | | 337 | |
| 338 | const PackedArray = PackedIntArray(I, int_count); | 338 | const PackedArray = PackedIntArray(I, int_count); |
| 339 | const expected_bytes = ((bits * int_count) + 7) / 8; | 339 | const expected_bytes = ((bits * int_count) + 7) / 8; |
| ... | @@ -384,8 +384,8 @@ test "PackedIntSlice" { | ... | @@ -384,8 +384,8 @@ test "PackedIntSlice" { |
| 384 | comptime var bits = 0; | 384 | comptime var bits = 0; |
| 385 | inline while (bits <= max_bits) : (bits += 1) { | 385 | inline while (bits <= max_bits) : (bits += 1) { |
| 386 | //alternate unsigned and signed | 386 | //alternate unsigned and signed |
| 387 | const even = bits % 2 == 0; | 387 | const sign: std.meta.Signedness = if (bits % 2 == 0) .signed else .unsigned; |
| 388 | const I = std.meta.Int(even, bits); | 388 | const I = std.meta.Int(sign, bits); |
| 389 | const P = PackedIntSlice(I); | 389 | const P = PackedIntSlice(I); |
| 390 | | 390 | |
| 391 | var data = P.init(&buffer, int_count); | 391 | var data = P.init(&buffer, int_count); |