Merge pull request #268 from iamgweej/feature/zig-update

Feature/zig update
This commit is contained in:
Sam Tebbs 2020-11-29 13:11:27 +00:00 committed by GitHub
commit 3e5d2bec38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -23,7 +23,7 @@ pub fn ComptimeBitmap(comptime BitmapType: type) type {
pub const BITMAP_FULL = std.math.maxInt(BitmapType); pub const BITMAP_FULL = std.math.maxInt(BitmapType);
/// The type of an index into a bitmap entry. The smallest integer needed to represent all bit positions in the bitmap entry type /// The type of an index into a bitmap entry. The smallest integer needed to represent all bit positions in the bitmap entry type
pub const IndexType = std.meta.IntType(.unsigned, std.math.log2(std.math.ceilPowerOfTwo(u16, std.meta.bitCount(BitmapType)) catch unreachable)); pub const IndexType = std.meta.Int(.unsigned, std.math.log2(std.math.ceilPowerOfTwo(u16, std.meta.bitCount(BitmapType)) catch unreachable));
bitmap: BitmapType, bitmap: BitmapType,
num_free_entries: BitmapType, num_free_entries: BitmapType,
@ -202,7 +202,7 @@ pub fn Bitmap(comptime BitmapType: type) type {
pub const BITMAP_FULL = std.math.maxInt(BitmapType); pub const BITMAP_FULL = std.math.maxInt(BitmapType);
/// The type of an index into a bitmap entry. The smallest integer needed to represent all bit positions in the bitmap entry type /// The type of an index into a bitmap entry. The smallest integer needed to represent all bit positions in the bitmap entry type
pub const IndexType = std.meta.IntType(.unsigned, std.math.log2(std.math.ceilPowerOfTwo(u16, std.meta.bitCount(BitmapType)) catch unreachable)); pub const IndexType = std.meta.Int(.unsigned, std.math.log2(std.math.ceilPowerOfTwo(u16, std.meta.bitCount(BitmapType)) catch unreachable));
num_bitmaps: usize, num_bitmaps: usize,
num_entries: usize, num_entries: usize,

View file

@ -125,7 +125,7 @@ pub const KeyAction = struct {
}; };
/// The type used to index the keyboard queue /// The type used to index the keyboard queue
const QueueIndex = std.meta.IntType(.unsigned, std.math.log2(QUEUE_SIZE)); const QueueIndex = std.meta.Int(.unsigned, std.math.log2(QUEUE_SIZE));
/// A keyboard buffer that stores keyboard actions. This corresponds to a single hardware keyboard /// A keyboard buffer that stores keyboard actions. This corresponds to a single hardware keyboard
pub const Keyboard = struct { pub const Keyboard = struct {