5 ms·
Oh, god, so awful. All those ifdefs.. Funny: Tried to find the comment commenting it out. I found it. #IF 0. Wow.
by sputnik27 11y ago
Oh, god, so awful. All those ifdefs..
Funny: Tried to find the comment commenting it out. I found it. #IF 0. Wow.
- jff 11y agoThat's a pretty standard way to comment out a huge chunk of code, because /* */ will get screwed up if there's another comment using the same convention inside, and putting // in front of every single line looks bad/makes copying code around painful. #if 0 is also a convenient way to flip bits of test/debug code on and off.
- provemewrong 11y agoThat's actually neat! Haven't touched C/C++ beyond university and didn't know about that.
- kbart 11y ago#if 0 <...> #else <...> #endif Is a pretty standard way to switch between new/old code while refactoring to check if behavior/output matches. Just change 0 to 1 to switch between "versions".