chore(lint): 改进代码样式 (#891)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2024-04-23 16:12:34 +09:00 committed by GitHub
parent b050b5d5b5
commit e0891200af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -187,7 +187,7 @@ func (t *ttsmode) setSoundMode(ctx *zero.Ctx, name string, character int) error
} }
} }
m := ctx.State["manager"].(*ctrl.Control[*zero.Ctx]) m := ctx.State["manager"].(*ctrl.Control[*zero.Ctx])
//按原来的逻辑map存的是前16位 // 按原来的逻辑map存的是前16位
storeIndex := (m.GetData(gid) &^ 0xffff00) | ((index << 8) & 0xff00) | ((int64(character) << 16) & 0xff0000) storeIndex := (m.GetData(gid) &^ 0xffff00) | ((index << 8) & 0xff00) | ((int64(character) << 16) & 0xff0000)
(*syncx.Map[int64, int64])(t).Store(gid, (storeIndex>>8)&0xffff) (*syncx.Map[int64, int64])(t).Store(gid, (storeIndex>>8)&0xffff)
return m.SetData(gid, storeIndex) return m.SetData(gid, storeIndex)