| 22 | } |
| 23 | |
| 24 | YGNodeRef YGNodeNewWithConfig(const YGConfigConstRef config) { |
| 25 | auto* node = new yoga::Node{resolveRef(config)}; |
| 26 | yoga::assertFatal( |
| 27 | config != nullptr, "Tried to construct YGNode with null config"); |
| 28 | Event::publish<Event::NodeAllocation>(node, {config}); |
| 29 | |
| 30 | return node; |
| 31 | } |
| 32 | |
| 33 | YGNodeRef YGNodeClone(YGNodeConstRef oldNodeRef) { |
| 34 | auto oldNode = resolveRef(oldNodeRef); |