Skip to content
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

Fixed Comment Describing Children Deletion #389

Open
wants to merge 1 commit into
base: v0_8
Choose a base branch
from

Conversation

mechPenSketch
Copy link

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
Contributor

r888800009 commented Aug 29, 2024

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

@@ -371,7 +371,7 @@ void incDeleteChildWithHistory(Node n) {
}

/**
Deletes child with history
Deletes multiple children with history
Copy link
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
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
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