mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
Use 0-length slice instead of nil to keep capacities
This commit is contained in:
parent
59333ba1ad
commit
fc3e8bebe4
@ -59,6 +59,6 @@ func flushDelayedCommands() bool {
|
||||
for _, c := range delayedCommands {
|
||||
c.f()
|
||||
}
|
||||
delayedCommands = nil
|
||||
delayedCommands = delayedCommands[:0]
|
||||
return true
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ func (q *commandQueue) Flush() {
|
||||
q.commands = q.commands[nc:]
|
||||
}
|
||||
theGraphicsDriver.End()
|
||||
q.commands = nil
|
||||
q.commands = q.commands[:0]
|
||||
q.nvertices = 0
|
||||
q.nindices = 0
|
||||
q.tmpNumIndices = 0
|
||||
|
Loading…
Reference in New Issue
Block a user