Scene play and o-counter history view and editing (#4532)

Co-authored-by: randemgame <61895715+randemgame@users.noreply.github.com>
This commit is contained in:
WithoutPants
2024-02-22 11:28:18 +11:00
committed by GitHub
parent 0c2a2190e5
commit a303446bb7
51 changed files with 3581 additions and 564 deletions

View File

@@ -153,3 +153,20 @@ func Map[T any, V any](vs []T, f func(T) V) []V {
}
return ret
}
func PtrsToValues[T any](vs []*T) []T {
ret := make([]T, len(vs))
for i, v := range vs {
ret[i] = *v
}
return ret
}
func ValuesToPtrs[T any](vs []T) []*T {
ret := make([]*T, len(vs))
for i, v := range vs {
vv := v
ret[i] = &vv
}
return ret
}