chore: remove magic numbers

This commit is contained in:
2022-04-13 21:39:35 -03:00
parent ffbb31c767
commit dfe94fb931
6 changed files with 17 additions and 29 deletions

View File

@@ -87,21 +87,6 @@ pub fn safeTitle(title: [12]u8) [12]u8 {
return result;
}
pub fn fixTitle(alloc: std.mem.Allocator, title: [12]u8) ![]u8 {
var len: usize = 12;
for (title) |char, i| {
if (char == 0) {
len = i;
break;
}
}
const buf = try alloc.alloc(u8, len);
std.mem.copy(u8, buf, title[0..len]);
return buf;
}
pub const FilePaths = struct {
rom: []const u8,
bios: ?[]const u8,