From ab75a756f04fa95403556a3df275007c95063897 Mon Sep 17 00:00:00 2001 From: qlli Date: Mon, 14 Oct 2024 16:47:07 +0800 Subject: [PATCH] Remove old clone interfaces --- sprite.go | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/sprite.go b/sprite.go index d614c625..bc64b406 100644 --- a/sprite.go +++ b/sprite.go @@ -418,7 +418,7 @@ func cloneSprite(out reflect.Value, outPtr Sprite, in reflect.Value, v specsp) * } func Gopt_SpriteImpl_Clone__0(sprite Sprite) { - Gopt_Sprite_Clone__1(sprite, nil) + Gopt_SpriteImpl_Clone__1(sprite, nil) } func Gopt_SpriteImpl_Clone__1(sprite Sprite, data interface{}) { @@ -436,25 +436,6 @@ func Gopt_SpriteImpl_Clone__1(sprite Sprite, data interface{}) { } } -func Gopt_Sprite_Clone__0(sprite Sprite) { - Gopt_Sprite_Clone__1(sprite, nil) -} - -func Gopt_Sprite_Clone__1(sprite Sprite, data interface{}) { - src := spriteOf(sprite) - if debugInstr { - log.Println("Clone", src.name) - } - in := reflect.ValueOf(sprite).Elem() - v := reflect.New(in.Type()) - out, outPtr := v.Elem(), v.Interface().(Sprite) - dest := cloneSprite(out, outPtr, in, nil) - src.g.addClonedShape(src, dest) - if dest.hasOnCloned { - dest.doWhenCloned(dest, data) - } -} - func (p *SpriteImpl) OnCloned__0(onCloned func(data interface{})) { p.hasOnCloned = true p.allWhenCloned = &eventSink{