Skip to content

Fixed Comment Describing Children Deletion#389

Open
mechPenSketch wants to merge 1 commit intoInochi2D:v0_8from
mechPenSketch:delete-children-comment
Open

Fixed Comment Describing Children Deletion#389
mechPenSketch wants to merge 1 commit intoInochi2D:v0_8from
mechPenSketch:delete-children-comment

Conversation

@mechPenSketch
Copy link
Copy Markdown

I've found a repeated comment while working on one of my issues. This change elaborates on the comment above incDeleteChildrenWithHistory(Node[] ns) that multiple children would be deleted, rather than a single child.

@r888800009
Copy link
Copy Markdown
Contributor

r888800009 commented Aug 29, 2024

why not try refactoring the code? These two functions are almost the same


/**
Deletes child with history
Deletes multiple children with history
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think delete node would be better than delete children

@mechPenSketch
Copy link
Copy Markdown
Author

why not try refactoring the code? These two functions are almost the same

The code isn't the problem. The comment describing the function is. incDeleteChildrenWithHistory(Node[] ns) has the exact same description as incDeleteChildWithHistory(Node n), so I changed "child" to "multiple children" to differentiate between them in how many nodes they affect.

@r888800009
Copy link
Copy Markdown
Contributor

@mechPenSketch
This is true, but I would suggest doing more, like splitting the code into a function. This would contribute a bit more than just modifying comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants