Repository navigation
Fix a typo - #43
Fix a typo#43katoue wants to merge 4 commits into
Conversation
|
Hi @katoue, Thank you for the contribution, this is a great find. Clearly there are tests missing for this class, or this wouldn't have gone unnoticed for so long. Would you mind adding at least one that covers the code path you fixed? PS: I noticed you edited out the "Generated with Claude Code" line. As per our contribution guidelines, please disclose the use of AI. |
|
Done — added tests in |
|
Thank you for adding these tests. Unfortunately, the build now fails on CI with the following error: Please fix this issue and test this locally on your side as well. |
|
Fixed — added |
CCP-Aporia
left a comment
There was a problem hiding this comment.
I think the inclusion of CcpAssert.h should really happen in CcpPairingHeap.h: that header already uses the macro, and therefore any consumers may run into the same compilation error that the test had experienced.
Summary
PairingHeap<T>::remove(nodeptr_t)callednode->Unlink;(missing parentheses), which just formed an unused pointer-to-member-function expression instead of actually callingUnlink(). The node was never detached from its parent's child/sibling chain before being deleted, leaving a dangling pointer in the tree.node->Unlink();to match the correct call already used elsewhere (e.g.remove_min()'s use ofDetachChildren).Test plan
AI assistance
Claude Code (claude.com/claude-code) was used to write the tests.