Minor changes to tools/odinfmt
This commit is contained in:
1 parent
28e9a4f79c
commit
286cb60c45
2 files changed
+30
-14
No files matched your search
@@ -36,8 +36,7 @@ parse_args :: proc(ctx: ^Flag_Context, args: []string) -> Flag_Error {
|
||||
|
||||
args := args;
|
||||
|
||||
for true {
|
||||
|
||||
for {
|
||||
if len(args) == 0 {
|
||||
return .None;
|
||||
}
|
||||
@@ -82,15 +81,11 @@ parse_args :: proc(ctx: ^Flag_Context, args: []string) -> Flag_Error {
|
||||
}
|
||||
|
||||
if reflect.is_boolean(flag.type) {
|
||||
tmp := true;
|
||||
tmp: b64 = true;
|
||||
mem.copy(flag.data, &tmp, flag.type.size);
|
||||
flag.parsed = true;
|
||||
continue;
|
||||
} else
|
||||
|
||||
//must be in the next argument
|
||||
if value == "" {
|
||||
|
||||
} else if value == "" { // must be in the next argument
|
||||
if len(args) == 0 {
|
||||
return .Arg_Error;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user