... and don't keep. This causes nasty, mysterious bugs and has no advantages.
This commit is contained in:
parent
cad193a1c4
commit
75877ebf43
1 changed files with 2 additions and 2 deletions
|
@ -186,7 +186,7 @@ static naRef f_removeChild(naContext c, naRef me, int argc, naRef* args)
|
|||
naRef child = naVec_get(argv, 0);
|
||||
naRef index = naVec_get(argv, 1);
|
||||
if(!naIsString(child) || !naIsNum(index)) return naNil();
|
||||
(*node)->removeChild(naStr_data(child), (int)index.num);
|
||||
(*node)->removeChild(naStr_data(child), (int)index.num, false);
|
||||
return naNil();
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ static naRef f_removeChildren(naContext c, naRef me, int argc, naRef* args)
|
|||
naRef name = naVec_get(argv, 0);
|
||||
if(!naIsString(name)) return naNil();
|
||||
vector<SGPropertyNode_ptr> children
|
||||
= (*node)->removeChildren(naStr_data(name));
|
||||
= (*node)->removeChildren(naStr_data(name), false);
|
||||
for(unsigned int i=0; i<children.size(); i++)
|
||||
naVec_append(result, propNodeGhostCreate(c, children[i]));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue