From f5304237b58c61cf2eb023d8a4c91d97c8808d33 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sun, 29 Mar 2020 15:58:04 +0200 Subject: Pass self as immutable where possible --- src/cursor.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cursor.zig') diff --git a/src/cursor.zig b/src/cursor.zig index af39e73..995f91d 100644 --- a/src/cursor.zig +++ b/src/cursor.zig @@ -89,12 +89,12 @@ pub const Cursor = struct { c.wl_signal_add(&self.seat.wlr_seat.events.request_set_cursor, &self.listen_request_set_cursor); } - pub fn destroy(self: *Self) void { + pub fn destroy(self: Self) void { c.wlr_xcursor_manager_destroy(self.wlr_xcursor_manager); c.wlr_cursor_destroy(self.wlr_cursor); } - fn processMove(self: *Self, time: u32) void { + fn processMove(self: Self, time: u32) void { // Move the grabbed view to the new position. // TODO: log on null if (self.grabbed_view) |view| { @@ -103,7 +103,7 @@ pub const Cursor = struct { } } - fn processsResize(self: *Self, time: u32) void { + fn processsResize(self: Self, time: u32) void { // Resizing the grabbed view can be a little bit complicated, because we // could be resizing from any corner or edge. This not only resizes the view // on one or two axes, but can also move the view if you resize from the top @@ -152,7 +152,7 @@ pub const Cursor = struct { ); } - fn processMotion(self: *Self, time: u32) void { + fn processMotion(self: Self, time: u32) void { // If the mode is non-passthrough, delegate to those functions. if (self.mode == CursorMode.Move) { self.processMove(time); -- cgit v1.2.3