MCPcopy Create free account
hub / github.com/defold/defold / AllocateNode

Function AllocateNode

engine/gui/src/gui.cpp:2627–2639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2625 }
2626
2627 static uint32_t AllocateNode(HScene scene)
2628 {
2629 if (scene->m_NodePool.Remaining() == 0)
2630 {
2631 return scene->m_NodePool.Capacity();
2632 }
2633 uint16_t index = scene->m_NodePool.Pop();
2634 if (index >= scene->m_Nodes.Size())
2635 {
2636 scene->m_Nodes.SetSize(index + 1);
2637 }
2638 return index;
2639 }
2640
2641 HNode NewNode(HScene scene, const Point3& position, const Vector3& size, NodeType node_type, uint32_t custom_type)
2642 {

Callers 5

NewNodeFunction · 0.85
CloneNodeFunction · 0.85
CreateProxyMethod · 0.85
InsertLeafMethod · 0.85
RebuildBottomUpMethod · 0.85

Calls 5

RemainingMethod · 0.45
CapacityMethod · 0.45
PopMethod · 0.45
SizeMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected