MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / removeChild

Method removeChild

cp-profiler/src/cpprofiler/tree/node.cpp:198–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void Node::removeChild(int alt)
199{
200 auto kids = childrenCount();
201
202 /// Note: only works for two kids for now
203 if (kids == 2)
204 {
205 /// move second child to first position
206 if (alt == 0)
207 {
208 const auto rkid = getChild(1);
209 setChild(rkid, 0);
210 }
211
212 setTag(Tag::ONE_CHILD);
213 }
214}
215
216Node::~Node()
217{

Callers 1

removeNodeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected