mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user