MCPcopy Create free account
hub / github.com/cinder/Cinder / ExampleTree_CreateNode

Function ExampleTree_CreateNode

src/imgui/imgui_demo.cpp:764–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762};
763
764static ExampleTreeNode* ExampleTree_CreateNode(const char* name, int uid, ExampleTreeNode* parent)
765{
766 ExampleTreeNode* node = IM_NEW(ExampleTreeNode);
767 snprintf(node->Name, IM_ARRAYSIZE(node->Name), "%s", name);
768 node->UID = uid;
769 node->Parent = parent;
770 node->IndexInParent = parent ? (unsigned short)parent->Childs.Size : 0;
771 if (parent)
772 parent->Childs.push_back(node);
773 return node;
774}
775
776static void ExampleTree_DestroyNode(ExampleTreeNode* node)
777{

Callers 1

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected