-
Notifications
You must be signed in to change notification settings - Fork 21
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
Tidy analyseNode #1295
Tidy analyseNode #1295
Conversation
Makes the code easier to read/maintain for me... who tends to work on the analyser. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly can't see how this is tidying up the code. There are now more if
statements and we even call swapLeftAndRightChildren()
(7.23k times in our tests, i.e. ~94% of the time!). IOW, the code is now less efficient and, for me, more difficult to understand.
Otherwise, if you are to "tidy" that bit of code then you might also want to "tidy" the case of a piecewise statement (search for childCount >= 2
).
Bottom line, if you guys are happy with this PR then feel free to force merge it.
Fixes #1293.