chore: ensure code compiles on zig master
This commit is contained in:
parent
fc3cbaaefa
commit
811fa0c1b5
|
@ -13,13 +13,13 @@ const PIXELBUF_LEN = disp.PIXELBUF_LEN;
|
||||||
pub const Scheduler = struct {
|
pub const Scheduler = struct {
|
||||||
pixels_ptr: *[PIXELBUF_LEN]u8,
|
pixels_ptr: *[PIXELBUF_LEN]u8,
|
||||||
timestamp: u64,
|
timestamp: u64,
|
||||||
queue: PriorityQueue(Event),
|
queue: PriorityQueue(Event, lessThan),
|
||||||
|
|
||||||
pub fn new(alloc: *Allocator, pixels_ptr: *[PIXELBUF_LEN]u8) Scheduler {
|
pub fn new(alloc: *Allocator, pixels_ptr: *[PIXELBUF_LEN]u8) Scheduler {
|
||||||
var queue = Scheduler{
|
var queue = Scheduler{
|
||||||
.timestamp = 0,
|
.timestamp = 0,
|
||||||
.pixels_ptr = pixels_ptr,
|
.pixels_ptr = pixels_ptr,
|
||||||
.queue = PriorityQueue(Event).init(alloc, less_than),
|
.queue = PriorityQueue(Event, lessThan).init(alloc),
|
||||||
};
|
};
|
||||||
|
|
||||||
queue.pushEvent(.{
|
queue.pushEvent(.{
|
||||||
|
@ -88,7 +88,7 @@ pub const EventKind = enum {
|
||||||
DelayTimer,
|
DelayTimer,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn less_than(a: Event, b: Event) Order {
|
fn lessThan(a: Event, b: Event) Order {
|
||||||
return std.math.order(a.timestamp, b.timestamp);
|
return std.math.order(a.timestamp, b.timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue