Mode: eliminate "self" naming convention
This commit is contained in:
parent
b9dde3c49b
commit
3077074329
@ -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 Mode = @This();
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const util = @import("util.zig");
|
const util = @import("util.zig");
|
||||||
@ -28,11 +28,11 @@ mappings: std.ArrayListUnmanaged(Mapping) = .{},
|
|||||||
pointer_mappings: std.ArrayListUnmanaged(PointerMapping) = .{},
|
pointer_mappings: std.ArrayListUnmanaged(PointerMapping) = .{},
|
||||||
switch_mappings: std.ArrayListUnmanaged(SwitchMapping) = .{},
|
switch_mappings: std.ArrayListUnmanaged(SwitchMapping) = .{},
|
||||||
|
|
||||||
pub fn deinit(self: *Self) void {
|
pub fn deinit(mode: *Mode) void {
|
||||||
util.gpa.free(self.name);
|
util.gpa.free(mode.name);
|
||||||
for (self.mappings.items) |m| m.deinit();
|
for (mode.mappings.items) |m| m.deinit();
|
||||||
self.mappings.deinit(util.gpa);
|
mode.mappings.deinit(util.gpa);
|
||||||
for (self.pointer_mappings.items) |*m| m.deinit();
|
for (mode.pointer_mappings.items) |*m| m.deinit();
|
||||||
self.pointer_mappings.deinit(util.gpa);
|
mode.pointer_mappings.deinit(util.gpa);
|
||||||
self.switch_mappings.deinit(util.gpa);
|
mode.switch_mappings.deinit(util.gpa);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user