code: create util.allocator and use globally
river is not a library and passing a general purpose allocators around everywhere does not make sense and leads to ugly code. This does not prevent us from using local arenas if they are fitting.
This commit is contained in:
@ -95,7 +95,7 @@ pub fn deinit(self: *Self) void {
|
||||
|
||||
pub fn addOutput(self: *Self, wlr_output: *c.wlr_output) void {
|
||||
// TODO: Handle failure
|
||||
const node = self.outputs.allocateNode(self.server.allocator) catch unreachable;
|
||||
const node = self.outputs.allocateNode(util.allocator) catch unreachable;
|
||||
node.data.init(self, wlr_output) catch unreachable;
|
||||
self.outputs.append(node);
|
||||
|
||||
|
Reference in New Issue
Block a user