Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Two changes for enum handling in getopt
It's better to define enum Color { no, yes } because this enables writing compact code like if (color) { ... }. Further setting the variable is done using std.conv's parse which makes the code more compact and throws if the conversion fails.
- Loading branch information
Jens K. Mueller
committed
Apr 6, 2011
1 parent
4c71539
commit 29eec1e
Showing
1 changed file
with
12 additions
and
16 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