4 ms·
Microsoft's docs have an interesting idea of what good nesting looks like: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bb776913(v
by Thorrez 7y ago
Microsoft's docs have an interesting idea of what good nesting looks like:
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bb776913(v=vs.85)?redirectedfrom=MSDN#basic-usage https://docs.microsoft.com/en-us/previous-versions/windows/d...
Apparently 13 different indentation levels is good.
- reilly3000 7y agowow.
- jpz 7y agoI actually find that surprisingly readable, probably because of the indent size which clearly allows the eye to see the blocks - and the size of my very large monitor - but this code seems to indicate a religious dogma about avoiding early returns, which would otherwise straighten it up.
- a_t48 7y agoRefactoring it effectively needs some sort of scope guard, too, to run `pfd->Release();` and the like. It's just as much dogma to write C++ like C, avoiding RAII.