Use char instead of int for FSA rule input
This commit is contained in:
@@ -47,11 +47,10 @@ int fsa_add_state(fsa_t *fsa)
|
||||
return fsa->count++;
|
||||
}
|
||||
|
||||
void fsa_add_rule(fsa_t *fsa, int from, int to, int input)
|
||||
void fsa_add_rule(fsa_t *fsa, int from, int to, char input)
|
||||
{
|
||||
assert(fsa->count > from);
|
||||
assert(fsa->count > to);
|
||||
assert(input < ALPHABET_SIZE);
|
||||
|
||||
fsa_state_t *state = &fsa->states[from];
|
||||
if (state->count >= state->capacity) {
|
||||
|
||||
Reference in New Issue
Block a user