cleanups
This commit is contained in:
parent
5650efb17b
commit
4ce9a5b673
3 changed files with 0 additions and 27 deletions
|
@ -163,11 +163,6 @@ func (d *DrawDAG) Register(component, _ interface{}) error {
|
|||
return nil
|
||||
}
|
||||
if sc, ok := component.(Scanner); ok {
|
||||
/*for _, x := range sc.Scan() {
|
||||
if err := d.Register(x, nil); err != nil {
|
||||
return err
|
||||
}
|
||||
}*/
|
||||
scv := func(x interface{}) error {
|
||||
return d.Register(x, nil)
|
||||
}
|
||||
|
@ -239,9 +234,6 @@ func (d *DrawDAG) Unregister(component interface{}) {
|
|||
return
|
||||
}
|
||||
if sc, ok := component.(Scanner); ok {
|
||||
/*for _, x := range sc.Scan() {
|
||||
d.Unregister(x)
|
||||
}*/
|
||||
scv := func(x interface{}) error {
|
||||
d.Unregister(x)
|
||||
return nil
|
||||
|
|
|
@ -46,9 +46,6 @@ func (d *DrawDFS) draw(component interface{}, screen *ebiten.Image, opts ebiten.
|
|||
}
|
||||
// Has subcomponents? recurse
|
||||
if sc, ok := component.(Scanner); ok {
|
||||
/*for _, ch := range sc.Scan() {
|
||||
d.draw(ch, screen, opts)
|
||||
}*/
|
||||
scv := func(x interface{}) error {
|
||||
d.draw(x, screen, opts)
|
||||
return nil
|
||||
|
|
|
@ -75,12 +75,6 @@ func (g *Game) updateRecursive(c interface{}) error {
|
|||
return nil
|
||||
}
|
||||
if sc, ok := c.(Scanner); ok {
|
||||
/*for _, x := range sc.Scan() {
|
||||
if err := g.updateRecursive(x); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
*/
|
||||
if err := sc.Scan(g.updateRecursive); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -191,11 +185,6 @@ func preorderWalk(component, parent interface{}, visit func(component, parent in
|
|||
if !ok {
|
||||
return nil
|
||||
}
|
||||
/*for _, c := range sc.Scan() {
|
||||
if err := preorderWalk(c, component, visit); err != nil {
|
||||
return err
|
||||
}
|
||||
}*/
|
||||
scv := func(c interface{}) error {
|
||||
return preorderWalk(c, component, visit)
|
||||
}
|
||||
|
@ -215,11 +204,6 @@ func postorderWalk(component, parent interface{}, visit func(component, parent i
|
|||
scv := func(c interface{}) error {
|
||||
return postorderWalk(c, component, visit)
|
||||
}
|
||||
/*for _, c := range sc.Scan() {
|
||||
if err := postorderWalk(c, component, visit); err != nil {
|
||||
return err
|
||||
}
|
||||
}*/
|
||||
if err := sc.Scan(scv); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue