From 2e2d086d713cb38271a563c17e81180061a59091 Mon Sep 17 00:00:00 2001 From: "M. Sz" Date: Thu, 4 Mar 2021 11:37:16 +0100 Subject: [PATCH] animation data: lintfix --- d2common/d2fileformats/d2animdata/animdata.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/d2common/d2fileformats/d2animdata/animdata.go b/d2common/d2fileformats/d2animdata/animdata.go index 8e21c286..8a50f6c0 100644 --- a/d2common/d2fileformats/d2animdata/animdata.go +++ b/d2common/d2fileformats/d2animdata/animdata.go @@ -61,6 +61,7 @@ func (ad *AnimationData) GetRecordsCount() int { return len(ad.entries) } +// PushRecord adds a new record to entry named 'name' func (ad *AnimationData) PushRecord(name string) { ad.entries[name] = append( ad.entries[name], @@ -70,8 +71,10 @@ func (ad *AnimationData) PushRecord(name string) { ) } +// DeleteRecord teletes specified index from specified entry func (ad *AnimationData) DeleteRecord(name string, recordIdx int) error { newRecords := make([]*AnimationDataRecord, 0) + for n, i := range ad.entries[name] { if n == recordIdx { continue