From 30770743298f78e02ba07cde5604e7bfe223951a Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 14 Mar 2024 13:00:15 +0100 Subject: [PATCH] Mode: eliminate "self" naming convention --- river/Mode.zig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/river/Mode.zig b/river/Mode.zig index d6c3a39..d0f70d2 100644 --- a/river/Mode.zig +++ b/river/Mode.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 Mode = @This(); const std = @import("std"); const util = @import("util.zig"); @@ -28,11 +28,11 @@ mappings: std.ArrayListUnmanaged(Mapping) = .{}, pointer_mappings: std.ArrayListUnmanaged(PointerMapping) = .{}, switch_mappings: std.ArrayListUnmanaged(SwitchMapping) = .{}, -pub fn deinit(self: *Self) void { - util.gpa.free(self.name); - for (self.mappings.items) |m| m.deinit(); - self.mappings.deinit(util.gpa); - for (self.pointer_mappings.items) |*m| m.deinit(); - self.pointer_mappings.deinit(util.gpa); - self.switch_mappings.deinit(util.gpa); +pub fn deinit(mode: *Mode) void { + util.gpa.free(mode.name); + for (mode.mappings.items) |m| m.deinit(); + mode.mappings.deinit(util.gpa); + for (mode.pointer_mappings.items) |*m| m.deinit(); + mode.pointer_mappings.deinit(util.gpa); + mode.switch_mappings.deinit(util.gpa); }