Allow the addReplace action to replace existing nodes while keeping the ...

...same node id.

This allows transparent swapping of a synth (e.g. updating synthdefs with a new version) while ensuring all references to the node remain valid. Allow this on Groups for consistancy, though it's functionally identical to freeing all of the Group's children.
Git blame can be told to ignore whitespace. Though... I think neither
github nor most gui clients support this, which is where it's most likely
to be used.

- S


On Fri, Jun 13, 2014 at 1:59 PM, muellmusik <notifications@github.com>
wrote:

> In server/scsynth/SC_MiscCmds.cpp:
>
> > @@ -833,6 +833,8 @@ SCErr meth_s_new(World *inWorld, int inSize, char *inData, ReplyAddress* /*inRep
> >  		case 4 : {
> >  			Node *replaceThisNode = Msg_GetNode(inWorld, msg);
> >  			if (!replaceThisNode) return kSCErr_NodeNotFound;
> > +      Node_RemoveID(replaceThisNode);
> > +
>
> Even worse, changing it at this late date would mess up things like git
> blame, as many lines would be attributed to whomever made the trivial
> whitespace changes. (This is already true of any whitespace fix commits.)
> Maybe some git genius knows a way around this…
>
> But it's probably worth it IAC though just to help avoid further
> inconsistency.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/supercollider/supercollider/pull/1130/files#r13771399>
> .
>