git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit0aa182ce022f00dcfaee7c762e042ca9a70482ab
parent23c34894e4
authorIsaac Freund <[email protected]>
date2024-03-14 13:02
SwitchMapping: eliminate "self" naming convention

 river/SwitchMapping.zig | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/river/SwitchMapping.zig b/river/SwitchMapping.zig
index 2be8bfb..36fcee9 100644
--- a/river/SwitchMapping.zig
+++ b/river/SwitchMapping.zig
@@ -14,7 +14,7 @@
 // You should have received a copy of the GNU General Public License
 // along with this program. If not, see <https://www.gnu.org/licenses/>.
 
-const Self = @This();
+const SwitchMapping = @This();
 
 const Switch = @import("Switch.zig");
 const util = @import("util.zig");
@@ -27,21 +27,21 @@ pub fn init(
     switch_type: Switch.Type,
     switch_state: Switch.State,
     command_args: []const []const u8,
-) !Self {
+) !SwitchMapping {
     const owned_args = try util.gpa.alloc([:0]u8, command_args.len);
     errdefer util.gpa.free(owned_args);
     for (command_args, 0..) |arg, i| {
         errdefer for (owned_args[0..i]) |a| util.gpa.free(a);
         owned_args[i] = try util.gpa.dupeZ(u8, arg);
     }
-    return Self{
+    return SwitchMapping{
         .switch_type = switch_type,
         .switch_state = switch_state,
         .command_args = owned_args,
     };
 }
 
-pub fn deinit(self: Self) void {
-    for (self.command_args) |arg| util.gpa.free(arg);
-    util.gpa.free(self.command_args);
+pub fn deinit(mapping: SwitchMapping) void {
+    for (mapping.command_args) |arg| util.gpa.free(arg);
+    util.gpa.free(mapping.command_args);
 }