it's shorter

This commit is contained in:
Josh Deprez 2021-08-27 16:10:28 +10:00
parent 6e1eaab5c2
commit ba3994a97e

View file

@ -63,9 +63,7 @@ func (g *Game) registerComponent(c interface{}, path []interface{}) error {
continue continue
} }
// TODO: sub-quadratic? // TODO: sub-quadratic?
k := dexKey{c, b} for _, p := range append(path, c) {
g.dex[k] = append(g.dex[k], c)
for _, p := range path {
k := dexKey{p, b} k := dexKey{p, b}
g.dex[k] = append(g.dex[k], c) g.dex[k] = append(g.dex[k], c)
} }