fix more flatten bugs

This commit is contained in:
David Rose 2001-06-15 16:33:14 +00:00
parent d7ad60572c
commit feebd57503
4 changed files with 14 additions and 3 deletions

View File

@ -153,9 +153,12 @@ combine_with(Node *other) {
mark_bound_stale();
return this;
}
// Two CollisionNodes with different names can't combine.
return (Node *)NULL;
}
return (Node *)NULL;
return NamedNode::combine_with(other);
}
////////////////////////////////////////////////////////////////////

View File

@ -75,10 +75,14 @@ combine_with(Node *other) {
}
// The other node is also a NamedNode, or better, so it wins.
return other;
} else if (other->is_exact_type(get_class_type())) {
// We're not an ordinary NamedNode, but the other one is.
return this;
}
// We're something other than an ordinary NamedNode. Don't combine.
return (Node *)NULL;
return Node::combine_with(other);
}
////////////////////////////////////////////////////////////////////

View File

@ -208,6 +208,10 @@ combine_with(Node *other) {
if (is_exact_type(get_class_type())) {
// No, we're an ordinary Node.
return other;
} else if (other->is_exact_type(get_class_type())) {
// We're not an ordinary Node, but the other one is.
return this;
}
// We're something other than an ordinary Node. Don't combine.

View File

@ -136,7 +136,7 @@ combine_with(Node *other) {
return this;
}
return (Node *)NULL;
return NamedNode::combine_with(other);
}
////////////////////////////////////////////////////////////////////