removing bad assumption

This commit is contained in:
Emil Lerch 2023-09-18 15:46:23 -07:00
parent 5edd7ab733
commit 3b97559b5d
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -90,7 +90,6 @@ fn createOptionsModule(b: *std.Build, exe: *std.Build.Step.Compile) !*std.Build.
fn findBuildType(build_args: [][:0]u8) ?BuildType { fn findBuildType(build_args: [][:0]u8) ?BuildType {
var rc: ?BuildType = null; var rc: ?BuildType = null;
for (build_args[1..]) |arg| { for (build_args[1..]) |arg| {
if (std.mem.startsWith(u8, arg, "-")) break; // we're done as soon as we get to options
inline for (std.meta.fields(BuildType)) |field| { inline for (std.meta.fields(BuildType)) |field| {
if (std.mem.startsWith(u8, arg, field.name)) { if (std.mem.startsWith(u8, arg, field.name)) {
if (rc != null) if (rc != null)