4 ms·
Btw, here is a simpler technique I've used for shortening over-long if-statements: Replace if(A) { // 300 lines of code... } else { return FALSE
by mtdewcmu 11y ago
Btw, here is a simpler technique I've used for shortening over-long if-statements:
Replace
if(A) {
// 300 lines of code...
}
else {
return FALSE;
}
with
if(!A) {
return FALSE;
}
// 300 lines of code...
- animal531 11y agoI've been using this pattern for ages, but mainly for the amount of indentation that it saves me.