Document the has_val field of the arg_def_t struct
Until commit 4c2b30effc114f32e98a93d5fdb6ce02d19da04d
(https://aomedia-review.googlesource.com/c/aom/+/116721), the has_val
field of the arg_def_t struct had been used as a regular boolean, with
values 0 and 1. The special value of -1 was introduced in that commit to
indicate that the command-line argument has an optional value.
Add a comment to document the three possible values (0, 1, and -1).
Change-Id: Ide9cfe8e8bd377400392c88b52d289d4d6a1d6e2
diff --git a/common/args.h b/common/args.h
index 286f7dd..c886762 100644
--- a/common/args.h
+++ b/common/args.h
@@ -38,7 +38,9 @@
typedef struct arg_def {
const char *short_name;
const char *long_name;
- int has_val;
+ int has_val; // 0: The argument must not have a value.
+ // 1: The argument must have a value.
+ // -1: The argument may or may not have a value.
const char *desc;
const struct arg_enum_list *enums;
} arg_def_t;