all: apply suggestions from staticcheck.io

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-06-03 12:22:52 +02:00
committed by Elias Naur
parent 11192a5142
commit 916efb4612
13 changed files with 7 additions and 219 deletions
-18
View File
@@ -265,7 +265,6 @@ type clipState struct {
path []byte
pathKey ops.Key
intersect f32.Rectangle
push bool
clipKey
}
@@ -308,11 +307,6 @@ type encoder struct {
ntrans int
}
type encodeState struct {
trans f32.Affine2D
clip f32.Rectangle
}
// sizedBuffer holds a GPU buffer, or its equivalent CPU memory.
type sizedBuffer struct {
size int
@@ -1612,13 +1606,6 @@ func (e *encoder) numElements() int {
return len(e.scene)
}
func (e *encoder) append(e2 encoder) {
e.scene = append(e.scene, e2.scene...)
e.npath += e2.npath
e.npathseg += e2.npathseg
e.ntrans += e2.ntrans
}
func (e *encoder) transform(m f32.Affine2D) {
e.scene = append(e.scene, scene.Transform(m))
e.ntrans++
@@ -1666,11 +1653,6 @@ func (e *encoder) line(start, end f32.Point) {
e.npathseg++
}
func (e *encoder) quad(start, ctrl, end f32.Point) {
e.scene = append(e.scene, scene.Quad(start, ctrl, end))
e.npathseg++
}
func (c *collector) reset() {
c.prevFrame, c.frame = c.frame, c.prevFrame
c.profile = false