boolean options parsing bit
Boolean switches: add an omitted 'break', plus a few 'default' cases that would matter if someone turned on the warning about a switch statement with 'enum' index that doesn't have cases for all possible values of that enum. I haven't made any attempt to be exhaustive about those; these few were just right in the same place.
This commit is contained in:
@@ -4424,6 +4424,9 @@ optfn_boolean(int optidx, int req, boolean negated, char *opts, char *op)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break; /* from opt_perm_invent */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* this dates from when 'O' prompted for a line of options text
|
||||
rather than use a menu to control access to which options can
|
||||
@@ -4449,6 +4452,8 @@ optfn_boolean(int optidx, int req, boolean negated, char *opts, char *op)
|
||||
case opt_tiled_map:
|
||||
iflags.wc_ascii_map = negated;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* only do processing below if setting with doset() */
|
||||
@@ -4545,6 +4550,8 @@ optfn_boolean(int optidx, int req, boolean negated, char *opts, char *op)
|
||||
case opt_rest_on_space:
|
||||
update_rest_on_space();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* boolean value has been toggled but some option changes can
|
||||
|
||||
Reference in New Issue
Block a user