From c3cee0b91fea94171e263b18e5b799df55c64a35 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 14 Mar 2024 12:58:50 +0100 Subject: [PATCH] PointerMapping: eliminate "self" naming convention --- river/PointerMapping.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/river/PointerMapping.zig b/river/PointerMapping.zig index df9d9bb..441800f 100644 --- a/river/PointerMapping.zig +++ b/river/PointerMapping.zig @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -const Self = @This(); +const PointerMapping = @This(); const std = @import("std"); const assert = std.debug.assert; @@ -39,7 +39,7 @@ pub fn init( modifiers: wlr.Keyboard.ModifierMask, action_type: std.meta.Tag(Action), command_args: []const [:0]const u8, -) !Self { +) !PointerMapping { assert(action_type == .command or command_args.len == 1); var arena = std.heap.ArenaAllocator.init(util.gpa); @@ -60,7 +60,7 @@ pub fn init( }, }; - return Self{ + return PointerMapping{ .event_code = event_code, .modifiers = modifiers, .action = action, @@ -68,7 +68,7 @@ pub fn init( }; } -pub fn deinit(self: *Self) void { - self.arena_state.promote(util.gpa).deinit(); - self.* = undefined; +pub fn deinit(pointer_mapping: *PointerMapping) void { + pointer_mapping.arena_state.promote(util.gpa).deinit(); + pointer_mapping.* = undefined; }