Small cleanup (#877)

* Remove unused variables and constants
* Remove redundant return statement
* Change flock.NewFlock to flock.New
This commit is contained in:
Acid147 2019-05-26 11:06:43 +02:00 committed by Hajime Hoshi
parent f9cec31bf6
commit 21abd85a63
5 changed files with 1 additions and 13 deletions

View File

@ -71,7 +71,6 @@ type decoder interface {
type decoded struct {
totalBytes int
readBytes int
posInBytes int
source io.Closer
decoder decoder

View File

@ -151,11 +151,6 @@ var (
zeroProgram program
)
const (
maxTriangles = graphics.IndicesNum / 3
maxQuads = maxTriangles / 2
)
// reset resets or initializes the OpenGL state.
func (s *openGLState) reset(context *context) error {
if err := context.reset(); err != nil {

View File

@ -432,11 +432,6 @@ func TestRestoreRecursive(t *testing.T) {
}
func TestReplacePixels(t *testing.T) {
const (
w = 17
h = 31
)
img := NewImage(17, 31)
defer img.Dispose()

View File

@ -468,7 +468,6 @@ func (i *Image) allocate(shareable bool) {
i.backend = b
i.node = n
runtime.SetFinalizer(i, (*Image).Dispose)
return
}
func (i *Image) MakeVolatile() {

View File

@ -28,7 +28,7 @@ import (
"github.com/gofrs/flock"
)
var theLock = flock.NewFlock(filepath.Join(os.TempDir(), "ebitentest"))
var theLock = flock.New(filepath.Join(os.TempDir(), "ebitentest"))
func Lock() {
if err := theLock.Lock(); err != nil {