mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/graphicscommand: reduce boundary checks
This can be confirmed by this command: ``` go build -gcflags="-d=ssa/check_bce" ./internal/graphicscommand/ ``` Updates #2601
This commit is contained in:
parent
bcc2ead670
commit
2de64088dc
@ -100,8 +100,8 @@ func switchCommandQueue() {
|
||||
func (q *commandQueue) appendIndices(indices []uint16, offset uint16) {
|
||||
n := len(q.indices)
|
||||
q.indices = append(q.indices, indices...)
|
||||
for i := range indices {
|
||||
q.indices[n+i] += offset
|
||||
for i := n; i < len(q.indices); i++ {
|
||||
q.indices[i] += offset
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user