June 20, 2011 Re: Yet another slap on the hand by implicit bool to int conversions | ||||
|---|---|---|---|---|
| ||||
Andrej Mitrovic Wrote:
> if (mmioRead(hmmio, cast(LPSTR)&drum, DRUM.sizeof) != DRUM.sizeof)
How would you catch this bug:
if (mmioRead(hmmio, cast(LPSTR)&iFormat, DRUM.sizeof) != DRUM.sizeof)
If you didn't notice what you converted the code to, you probably forgot what's going on in this code. It has not that many braces to get lost in them.
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply