From 811fa0c1b55ab93787be423ca578f70dc2372330 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Thu, 28 Oct 2021 11:06:11 -0300 Subject: [PATCH] chore: ensure code compiles on zig master --- src/scheduler.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scheduler.zig b/src/scheduler.zig index 62a2ca5..0735291 100644 --- a/src/scheduler.zig +++ b/src/scheduler.zig @@ -13,13 +13,13 @@ const PIXELBUF_LEN = disp.PIXELBUF_LEN; pub const Scheduler = struct { pixels_ptr: *[PIXELBUF_LEN]u8, timestamp: u64, - queue: PriorityQueue(Event), + queue: PriorityQueue(Event, lessThan), pub fn new(alloc: *Allocator, pixels_ptr: *[PIXELBUF_LEN]u8) Scheduler { var queue = Scheduler{ .timestamp = 0, .pixels_ptr = pixels_ptr, - .queue = PriorityQueue(Event).init(alloc, less_than), + .queue = PriorityQueue(Event, lessThan).init(alloc), }; queue.pushEvent(.{ @@ -88,7 +88,7 @@ pub const EventKind = enum { DelayTimer, }; -fn less_than(a: Event, b: Event) Order { +fn lessThan(a: Event, b: Event) Order { return std.math.order(a.timestamp, b.timestamp); }