You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typedef int (*AVLTreeCompareFunc)(AVLTreeValue value1, AVLTreeValue value2);
But the documentation (and code) shows that this function is for comparing the keys of two nodes in the tree, so the declaration should actually be:
typedef int (*AVLTreeCompareFunc)(AVLTreeKey key1, AVLTreeKey key2);
As both AVLTreeKey and AVLTreeValue are themselves typedefed as **void ***, it doesn’t actually make any difference to the function operation, but it makes the prototype confusing.
The text was updated successfully, but these errors were encountered:
nitsel88
added a commit
to nitsel88/c-algorithms
that referenced
this issue
Oct 23, 2015
At line 119 of https://github.com/fragglet/c-algorithms/blob/master/src/avl-tree.h, there is a function pointer for AVLTreeCompareFunc declared.
The declaration is:
But the documentation (and code) shows that this function is for comparing the keys of two nodes in the tree, so the declaration should actually be:
As both AVLTreeKey and AVLTreeValue are themselves typedefed as **void ***, it doesn’t actually make any difference to the function operation, but it makes the prototype confusing.
The text was updated successfully, but these errors were encountered: