-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
STYLE: Remove unreachable code #4980
STYLE: Remove unreachable code #4980
Conversation
The value of m_PQcount is always explicitly set to zero. Remove conditional code that depends on the value of m_PQcount not being zero.
PointType currentCircle{}; | ||
FortuneHalfEdge * leftHalfEdge; | ||
FortuneHalfEdge * rightHalfEdge; | ||
FortuneHalfEdge * left2HalfEdge; | ||
FortuneHalfEdge * right2HalfEdge; | ||
FortuneHalfEdge * newHE; | ||
FortuneSite * findSite; | ||
FortuneSite * topSite; | ||
FortuneSite * saveSite; | ||
FortuneEdge * newEdge; | ||
FortuneSite * meetSite; | ||
FortuneSite * newVert; | ||
bool saveBool; |
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.
First of all, I like style commits that remove unused code 👍 Do you possibly have an explanation, why so much of the code of VoronoiDiagram2DGenerator seems unused or useless? Is it unfinished work?
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.
Please consider a more specific commit message header, for example:
STYLE: Remove unreachable code from Voronoi GenerateVDFortune
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.
There are some methods, such as deletePQ
, which modify m_PQcount
. They are invoked, e.g. from here:
https://github.com/InsightSoftwareConsortium/ITK/blob/v5.4.0/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx#L1137
So this code refactoring seems overly aggressive.
Abandoning. Static analysis indicated that this was unused code, and a review of this file verified that. local quick test passed, but perhaps that did not hit this codebase. |
The value of m_PQcount is always explicitly set to zero. Remove conditional code that depends on the value of m_PQcount not being zero.
PR Checklist