mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicscommand: remove a redundant boundary check
The boundary is already checked the above 'copy' call. This can be confirmed by the result of this command. ``` go build -gcflags="-d=ssa/check_bce" ./internal/graphicscommand/ ```
This commit is contained in:
parent
407d7bd43f
commit
c00795416a
@ -662,8 +662,6 @@ func (q *commandQueue) prependPreservedUniforms(uniforms []uint32, shader *Shade
|
||||
origUniforms := uniforms
|
||||
uniforms = q.uint32sBuffer.alloc(len(origUniforms) + graphics.PreservedUniformUint32Count)
|
||||
copy(uniforms[graphics.PreservedUniformUint32Count:], origUniforms)
|
||||
// Check the slice length explicitly to reduce boundary checks.
|
||||
_ = uniforms[:graphics.PreservedUniformUint32Count]
|
||||
|
||||
// Set the destination texture size.
|
||||
dw, dh := dst.InternalSize()
|
||||
|
Loading…
Reference in New Issue
Block a user