Adding convenience CloneTo(..)
This commit is contained in:
parent
2dee7aa756
commit
fc4a2403da
|
@ -54,11 +54,16 @@ public {{_self.struct_type(o)}} {{o.name}} {{_self.base_struct_class(o)}}
|
|||
}
|
||||
|
||||
{{_self.comment_non_cloneable_begin(o)}}
|
||||
public void CloneTo(ref {{o.name}} dst)
|
||||
{
|
||||
MetaSync.Clone(this, ref dst, AutogenBundle.createById);
|
||||
}
|
||||
|
||||
public {{_self.virtual_clone(o)}} IMetaStruct clone()
|
||||
{
|
||||
var copy = new {{o.name}}();
|
||||
MetaSync.Clone(this, ref copy, AutogenBundle.createById);
|
||||
return copy;
|
||||
var dst = new {{o.name}}();
|
||||
CloneTo(ref dst);
|
||||
return dst;
|
||||
}
|
||||
{{_self.comment_non_cloneable_end(o)}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue