From 9cb82e3180b2325ab95170f81e60c415f41fee36 Mon Sep 17 00:00:00 2001 From: Luna Date: Mon, 1 Jun 2020 22:34:48 -0300 Subject: [PATCH] remove unecessary code --- src/runner.zig | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/runner.zig b/src/runner.zig index 445c391..036975d 100644 --- a/src/runner.zig +++ b/src/runner.zig @@ -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.