-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
locale.c: Refactor S_get_category_index()
There is actually only one place where the locale category can be input from code outside this file. Now that the previous commit added validation to that one spot, The rest of the calls should already be validated, and if the input is bad, it means that there is a serious error in the logic of this code, and warrants panicking. This commit collapses two functions into one plus a macro to call it with the right parameters. It moves the warning into the one place where it is useful, and panics if there is a problem otherwise. And it adds tests for the warning.
- Loading branch information
1 parent
54dc52e
commit a2d04a5
Showing
5 changed files
with
61 additions
and
53 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.