| 769 | }; |
| 770 | |
| 771 | static ExampleTreeNode* ExampleTree_CreateNode(const char* name, int uid, ExampleTreeNode* parent) |
| 772 | { |
| 773 | ExampleTreeNode* node = IM_NEW(ExampleTreeNode); |
| 774 | snprintf(node->Name, IM_COUNTOF(node->Name), "%s", name); |
| 775 | node->UID = uid; |
| 776 | node->Parent = parent; |
| 777 | node->IndexInParent = parent ? parent->Childs.Size : 0; |
| 778 | if (parent) |
| 779 | parent->Childs.push_back(node); |
| 780 | return node; |
| 781 | } |
| 782 | |
| 783 | static void ExampleTree_DestroyNode(ExampleTreeNode* node) |
| 784 | { |
no test coverage detected