On Sunday, 17 June 2012 at 12:15:36 UTC, bearophile wrote:
Suggestions on the code:
- Try to use final switches.
- switch cases don't need (), so instead of case(foo): write case foo:
- Try to add const/immutable/pure/nothrow where possible.

Bye,
bearophile

Problem with final switches in this context is that images may be corrupt or badly encoded or something, which the decoder should just handle gracefully through a default I think, without crashing. The case statements though I will change, and though I have worlds of trouble with const-ness, I will endeavour to add those guarantees :)

Thanks for looking through




Reply via email to