parse-options.h: make the "flags" in "struct option" an enum
Change the "flags" members of "struct option" to refer to their corresponding "enum" defined earlier in the file. The benefit of changing this to an enum isn't as great as with some "enum parse_opt_type" as we'll always check this as a bitfield, so we can't rely on the compiler checking "case" arms for us. But let's do it for consistency with the rest of the file. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Oct 8, 2021 at 21:07 UTC
7bf7f0ba05b999e890f5738e08a7f5f70b71c633
1 file changed
+1
-1
parse-options.h
+1
-1
@@ -134,7 +134,7 @@ struct option {
134
const char *argh;
135
const char *help;
136
137
- int flags;
137
+ enum parse_opt_option_flags flags;
138
parse_opt_cb *callback;
139
intptr_t defval;
140
parse_opt_ll_cb *ll_callback;