remove unecessary code

This commit is contained in:
Luna 2020-06-01 22:34:48 -03:00
parent b00ab8e839
commit 9cb82e3180
1 changed files with 5 additions and 18 deletions

View File

@ -239,19 +239,11 @@ pub const Runner = struct {
) !void {
comptime const typ = lang.Command.tagToType(tag);
const command = cmd.cast(typ).?;
inline for (@typeInfo(typ).Struct.decls) |decl| {
comptime {
if (!std.mem.eql(u8, decl.name, "command_type")) {
continue;
}
}
const ctype = typ.command_type;
switch (ctype) {
.lv2_command => try self.executeLV2Command(command.*),
.custom_command => try self.executeCustomCommand(command.*),
else => @panic("TODO support command type"),
}
const ctype = typ.command_type;
switch (ctype) {
.lv2_command => try self.executeLV2Command(command.*),
.custom_command => try self.executeCustomCommand(command.*),
else => @panic("TODO support command type"),
}
}
@ -297,11 +289,6 @@ pub const Runner = struct {
.wildnoise => try self.runSingleCommand(cmd, .wildnoise),
.write => try self.runSingleCommand(cmd, .write),
.embed => try self.runSingleCommand(cmd, .embed),
else => {
std.debug.warn("TODO support {}\n", .{@tagName(cmd.tag)});
@panic("TODO support tag");
},
}
}
/// Run a list of commands.