(dirindex): Narrow member type to signed char to save cache.
(pathcost): Catch bad direction characters (should not happen).
This commit is contained in:
parent
6bfdc38df1
commit
a88f12017e
3 changed files with 13 additions and 6 deletions
|
@ -55,8 +55,9 @@ int diroff[][2] = {
|
|||
|
||||
/* this maps a character from a to z into the diroff mappings. It
|
||||
keeps us from having to loop if we don't want to */
|
||||
int dirindex[] = { 0, 4, 0, 0, 0, 0, 5, 0, 0, 2, 0, 0, 8,
|
||||
3, 0, 0, 0, 0, 0, 0, 1, 7, 0, 0, 6, 0
|
||||
signed char dirindex[] = {
|
||||
-1, 4, -1, -1, -1, -1, 5, 0, -1, 2, -1, -1, 8,
|
||||
3, -1, -1, -1, -1, -1, -1, 1, 7, -1, -1, 6, -1
|
||||
};
|
||||
|
||||
/* must agree with dirch[] and DIR_ defines */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue