-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor AgastDetector7_12s_computeCornerScore #3092
Refactor AgastDetector7_12s_computeCornerScore #3092
Conversation
…gastDetector7_12s_is_a_corner in preparation for next commits
Before: if (...) return true; else return false;
Before: if (cond1) return (cond2) else return false; Now: return (cond1 && cond2)
Before: if (cond1) return (cond2) else return false; Now: return (cond1 && cond2)
Before: if (cond1) return (cond2) else return false; Now: return (cond1 && cond2)
Before: if (cond1) return (cond2) else return false; Now: return (cond1 && cond2)
Before: if (cond1) return true else return (cond2); Now: return ((cond1) || (cond2));
Before: if (cond1) if (cond2) ... else return false; else return false; Now: if ((cond1) && (cond2)) ... else return false;
Before: if (cond1) return (cond2) else return (cond2 && cond3); Now: if (cond2) return (cond1 || cond3) else return false;
Before: if (cond) return false; else ... Now: if (!cond) ... else return false;
Before: if (cond1) if (cond2) ... else return false; else return false; Now: if ((cond1) && (cond2)) ... else return false;
Before: if (cond1) if (cond2) ... else return false; else return false; Now: if ((cond1) && (cond2)) ... else return false;
Before: if (cond1) return (cond2) else return (cond2 && cond3); Now: if (cond2) return (cond1 || cond3) else return false;
Before: if (cond1) return (cond2) else return false; Now: return (cond1 && cond2)
Before: if (cond1) return (cond2) else return (cond2 && cond3); Now: if (cond2) return (cond1 || cond3) else return false;
Before: if (cond1) if (cond2) ... else return false; else return false; Now: if ((cond1) && (cond2)) ... else return false;
Don't forget to rebase this against the current master. We already pushed the fix that gets rid of these out of space errors in the Windows CI. |
? This PR is basing on latest commit in master. |
This pull request has been automatically marked as stale because it hasn't had Come back whenever you have time. We look forward to your contribution. |
As currently clang-format will be applied to whole source: Is it possible to merge this PR before? I don't believe I can rebase this as it touches to many lines :/ |
It'll take some time until we reach the |
Had yesterday again a day full of updating dependencies, so I had again time to be a masochist ;). As last time I used this code to verify I didn't changed behavior.
Most changes are done with help of regular expressions. I'm happy that this exists.
Just in case you want to have fun: My favorite regexe to search for specific code snippets