-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Not found returns (0 0) for size and posn, use else ifs for switch
The many if statements formed a quasi switch statement, and as there was no default, it worked fine. I know need a default and it's easier to avoid mistakes if we use else if statements. Don't crash on invalid IDs for size and pos, return [0, 0] as sentinel values.
- Loading branch information
Showing
2 changed files
with
35 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters