MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / ExampleTree_CreateNode

Function ExampleTree_CreateNode

imgui_tiny_app/imgui/imgui_demo.cpp:842–852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

840};
841
842static ExampleTreeNode* ExampleTree_CreateNode(const char* name, int uid, ExampleTreeNode* parent)
843{
844 ExampleTreeNode* node = IM_NEW(ExampleTreeNode);
845 snprintf(node->Name, IM_COUNTOF(node->Name), "%s", name);
846 node->UID = uid;
847 node->Parent = parent;
848 node->IndexInParent = parent ? parent->Childs.Size : 0;
849 if (parent)
850 parent->Childs.push_back(node);
851 return node;
852}
853
854static void ExampleTree_DestroyNode(ExampleTreeNode* node)
855{

Callers 1

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected