std: eradicate u29 and embrace std.mem.Alignment
This commit is contained in:
@@ -2129,7 +2129,7 @@ const IndexHeader = struct {
|
||||
const len = @as(usize, 1) << @as(math.Log2Int(usize), @intCast(new_bit_index));
|
||||
const index_size = hash_map.capacityIndexSize(new_bit_index);
|
||||
const nbytes = @sizeOf(IndexHeader) + index_size * len;
|
||||
const bytes = try gpa.alignedAlloc(u8, @alignOf(IndexHeader), nbytes);
|
||||
const bytes = try gpa.alignedAlloc(u8, .of(IndexHeader), nbytes);
|
||||
@memset(bytes[@sizeOf(IndexHeader)..], 0xff);
|
||||
const result: *IndexHeader = @alignCast(@ptrCast(bytes.ptr));
|
||||
result.* = .{
|
||||
|
||||
Reference in New Issue
Block a user