| 405 | } |
| 406 | |
| 407 | static void validateParentageRecurse(TreeNode *tree) |
| 408 | { |
| 409 | if(tree->left != NIL) |
| 410 | { |
| 411 | if(tree->left->parent != tree) |
| 412 | Platform::debugBreak(); |
| 413 | |
| 414 | if(tree->left->size > tree->size) |
| 415 | Platform::debugBreak(); |
| 416 | validateParentageRecurse(tree->left); |
| 417 | } |
| 418 | if(tree->right != NIL) |
| 419 | { |
| 420 | if(tree->right->parent != tree) |
| 421 | Platform::debugBreak(); |
| 422 | |
| 423 | if(tree->right->size < tree->size) |
| 424 | Platform::debugBreak(); |
| 425 | validateParentageRecurse(tree->right); |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | static void validateTree() |
| 430 | { |