mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
Small cleanup (#877)
* Remove unused variables and constants * Remove redundant return statement * Change flock.NewFlock to flock.New
This commit is contained in:
parent
f9cec31bf6
commit
21abd85a63
@ -71,7 +71,6 @@ type decoder interface {
|
||||
|
||||
type decoded struct {
|
||||
totalBytes int
|
||||
readBytes int
|
||||
posInBytes int
|
||||
source io.Closer
|
||||
decoder decoder
|
||||
|
@ -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 {
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user