krzyzanowskim / Natalie

Natalie - Storyboard Code Generator (for Swift)
http://blog.krzyzanowskim.com/2015/04/15/natalie-storyboard-code-generator/
MIT License
1.17k stars 74 forks source link

Remove unused default case #52

Closed a2 closed 9 years ago

a2 commented 9 years ago

If there are any other cases—i.e., all cases are accounted for—the Swift compiler will complain that the default case is never executed.

a2 commented 9 years ago

Also, apologies about the whitespace changes. Didn't realize my editor was so picky. Append ?w=1 to the URL to hide those changes. :grin:

krzyzanowskim commented 9 years ago

there is flag "needDefault" here https://github.com/krzyzanowskim/Natalie/pull/52/files#diff-d1c685e124ba68b25695b77bf9a06a2cR1033 - I added it recently. I think it shouldn't be the case in real life, but since there is if statement, it seems possible path to not handle all cases. wdyt ?

a2 commented 9 years ago

I like the needDefault flag. Updated the PR to use that.