diff --git a/gesture/gesture.go b/gesture/gesture.go index 36ecd807..189b86a2 100644 --- a/gesture/gesture.go +++ b/gesture/gesture.go @@ -29,8 +29,6 @@ const doubleClickDuration = 200 * time.Millisecond // Click detects click gestures in the form // of ClickEvents. type Click struct { - // state tracks the gesture state. - state ClickState // clickedAt is the timestamp at which // the last click occurred. clickedAt time.Duration diff --git a/gpu/clip.go b/gpu/clip.go index 51022a08..920ebb94 100644 --- a/gpu/clip.go +++ b/gpu/clip.go @@ -6,7 +6,6 @@ import ( ) type quadSplitter struct { - verts []byte bounds f32.Rectangle contour uint32 d *drawOps diff --git a/internal/rendertest/bench_test.go b/internal/rendertest/bench_test.go index 04ad167f..c49a7ed0 100644 --- a/internal/rendertest/bench_test.go +++ b/internal/rendertest/bench_test.go @@ -19,7 +19,7 @@ import ( // use some global variables for benchmarking so as to not pollute // the reported allocs with allocations that we do not want to count. var ( - c1, c2, c3 = make(chan op.CallOp, 0), make(chan op.CallOp, 0), make(chan op.CallOp, 0) + c1, c2, c3 = make(chan op.CallOp), make(chan op.CallOp), make(chan op.CallOp) op1, op2, op3 op.Ops ) diff --git a/text/shaper.go b/text/shaper.go index c4ec48c8..880547ac 100644 --- a/text/shaper.go +++ b/text/shaper.go @@ -49,8 +49,7 @@ type faceCache struct { } func (c *Cache) lookup(font Font) *faceCache { - var f *faceCache - f = c.faceForStyle(font) + f := c.faceForStyle(font) if f == nil { font.Typeface = c.def f = c.faceForStyle(font) diff --git a/widget/material/loader.go b/widget/material/loader.go index 14291176..bec82b77 100644 --- a/widget/material/loader.go +++ b/widget/material/loader.go @@ -73,7 +73,6 @@ func clipLoader(ops *op.Ops, startAngle, endAngle, radius float64) { // Use quadratic beziér curves to approximate a circle arc and // minimize the error by capping the length of each curve segment. - const maxSegments = 20. nsegments := math.Round(20 * math.Pi / (endAngle - startAngle)) θ := (endAngle - startAngle) / nsegments