"remove" logic MUST only be on this method * If a class want's to extend the 'removeChild' behavior it only needs * to override this method */
| 1082 | * to override this method |
| 1083 | */ |
| 1084 | void Node::removeChild(Node* child, bool cleanup /* = true */) |
| 1085 | { |
| 1086 | // explicit nil handling |
| 1087 | if (_children.empty()) |
| 1088 | { |
| 1089 | return; |
| 1090 | } |
| 1091 | |
| 1092 | ssize_t index = _children.getIndex(child); |
| 1093 | if (index != AX_INVALID_INDEX) |
| 1094 | this->detachChild(child, index, cleanup); |
| 1095 | } |
| 1096 | |
| 1097 | void Node::removeChildByTag(int tag, bool cleanup /* = true */) |
| 1098 | { |