summaryrefslogtreecommitdiff
path: root/MySpace
diff options
context:
space:
mode:
Diffstat (limited to 'MySpace')
-rw-r--r--MySpace/collection.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/MySpace/collection.h b/MySpace/collection.h
index d0570f4..f8709e3 100644
--- a/MySpace/collection.h
+++ b/MySpace/collection.h
@@ -202,7 +202,7 @@ public:
}
virtual void add_all(DynamicArray<T> &other) {
- for(DynamicArray<T>::Iterator i = other.start(); i.has_val(); i.next()) {
+ for(Iterator i = other.start(); i.has_val(); i.next()) {
add(i.val());
}
}
@@ -554,7 +554,7 @@ protected:
if(n->parent->left == o) n->parent->left = n;
else if(n->parent->right == o) n->parent->right = n;
} else
- root = n;
+ BinaryTree<T, N>::root = n;
}
void rotate_left(N *n) {
@@ -570,7 +570,7 @@ protected:
if(p->parent->left == q) p->parent->left = p;
else if(p->parent->right == q) p->parent->right = p;
} else
- root = p;
+ BinaryTree<T, N>::root = p;
}
void rotate_right(N *n) {
N *p = n->left;
@@ -585,7 +585,7 @@ protected:
if(p->parent->left == q) p->parent->left = p;
else if(p->parent->right == q) p->parent->right = p;
} else
- root = p;
+ BinaryTree<T, N>::root = p;
}
void insert_case1(N *n) {
@@ -643,7 +643,7 @@ protected:
} else
delete_case1(n);
}
- if(root == n) root = 0;
+ if(BinaryTree<T, N>::root == n) BinaryTree<T, N>::root = 0;
delete n;
Collection<T>::count--;
}
@@ -773,7 +773,7 @@ template<class A, class B, class N = ColouredTreeNode<Pair<A, B> > > class Map:
protected:
N *find(A &key) const {
- N *n = root;
+ N *n = RedBlackTree< Pair< A, B >, N >::root;
while(n) {
if(n->val.first == key)
return n;