PointerMapping: eliminate "self" naming convention
This commit is contained in:
parent
278865065b
commit
c3cee0b91f
@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
const Self = @This();
|
const PointerMapping = @This();
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
@ -39,7 +39,7 @@ pub fn init(
|
|||||||
modifiers: wlr.Keyboard.ModifierMask,
|
modifiers: wlr.Keyboard.ModifierMask,
|
||||||
action_type: std.meta.Tag(Action),
|
action_type: std.meta.Tag(Action),
|
||||||
command_args: []const [:0]const u8,
|
command_args: []const [:0]const u8,
|
||||||
) !Self {
|
) !PointerMapping {
|
||||||
assert(action_type == .command or command_args.len == 1);
|
assert(action_type == .command or command_args.len == 1);
|
||||||
|
|
||||||
var arena = std.heap.ArenaAllocator.init(util.gpa);
|
var arena = std.heap.ArenaAllocator.init(util.gpa);
|
||||||
@ -60,7 +60,7 @@ pub fn init(
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
return Self{
|
return PointerMapping{
|
||||||
.event_code = event_code,
|
.event_code = event_code,
|
||||||
.modifiers = modifiers,
|
.modifiers = modifiers,
|
||||||
.action = action,
|
.action = action,
|
||||||
@ -68,7 +68,7 @@ pub fn init(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit(self: *Self) void {
|
pub fn deinit(pointer_mapping: *PointerMapping) void {
|
||||||
self.arena_state.promote(util.gpa).deinit();
|
pointer_mapping.arena_state.promote(util.gpa).deinit();
|
||||||
self.* = undefined;
|
pointer_mapping.* = undefined;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user