Trim some fat; removing this assertion makes Remove() about 5% faster.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4413
This commit is contained in:
Nicholas Nethercote
2005-08-14 23:00:57 +00:00
parent 756f513b51
commit 3b0f062e58

View File

@@ -358,9 +358,7 @@ static inline Int cmp_key_root(AvlTree* t, AvlNode* n)
// Returns True if the depth of the tree has grown.
static Bool avl_insert(AvlTree* t, AvlNode* n)
{
Int cmpres;
cmpres = cmp_key_root(t, n);
Int cmpres = cmp_key_root(t, n);
if (cmpres < 0) {
// Insert into the left subtree.
@@ -517,11 +515,7 @@ static Bool avl_removeroot(AvlTree* t);
static Bool avl_remove(AvlTree* t, AvlNode* n)
{
Bool ch;
Int cmpres;
vg_assert(t && t->root);
cmpres = cmp_key_root(t, n);
Int cmpres = cmp_key_root(t, n);
if (cmpres < 0) {
// Remove from the left subtree