authorgravatar for 57442prudil@sstebrno.euJan Prudil <57442prudil@sstebrno.eu> 2020-10-17 14:50:26+02:00
committergravatar for 57442prudil@sstebrno.euJan Prudil <57442prudil@sstebrno.eu> 2020-10-17 14:50:26+02:00
log132813849ce593db232751e55c0d0fe7636d87f1
treed49a913cdee72620d6a6e134d792b2285e149902
parentaadccc4206ea605719de789bc7c9c48557d02331

Convert remaining call sites


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

lib/std/packed_int_array.zig+4-4
...@@ -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 signed334 //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);
337337
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 signed386 //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);
390390
391 var data = P.init(&buffer, int_count);391 var data = P.init(&buffer, int_count);
test/stage1/behavior/bit_shifting.zig+2-2
...@@ -3,10 +3,10 @@ const expect = std.testing.expect;...@@ -3,10 +3,10 @@ const expect = std.testing.expect;
33
4fn ShardedTable(comptime Key: type, comptime mask_bit_count: comptime_int, comptime V: type) type {4fn ShardedTable(comptime Key: type, comptime mask_bit_count: comptime_int, comptime V: type) type {
5 const key_bits = @typeInfo(Key).Int.bits;5 const key_bits = @typeInfo(Key).Int.bits;
6 expect(Key == std.meta.Int(false, key_bits));6 expect(Key == std.meta.Int(.unsigned, key_bits));
7 expect(key_bits >= mask_bit_count);7 expect(key_bits >= mask_bit_count);
8 const shard_key_bits = mask_bit_count;8 const shard_key_bits = mask_bit_count;
9 const ShardKey = std.meta.Int(false, mask_bit_count);9 const ShardKey = std.meta.Int(.unsigned, mask_bit_count);
10 const shift_amount = key_bits - shard_key_bits;10 const shift_amount = key_bits - shard_key_bits;
11 return struct {11 return struct {
12 const Self = @This();12 const Self = @This();