mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
ebiten: refactoring: use struct{} to save memory
This commit is contained in:
parent
8919bc809a
commit
e237a70135
4
image.go
4
image.go
@ -528,7 +528,7 @@ type DrawTrianglesShaderOptions struct {
|
||||
}
|
||||
|
||||
// Check the number of images.
|
||||
var _ [len(DrawTrianglesShaderOptions{}.Images)]int = [graphics.ShaderImageCount]int{}
|
||||
var _ [len(DrawTrianglesShaderOptions{}.Images)]struct{} = [graphics.ShaderImageCount]struct{}{}
|
||||
|
||||
// DrawTrianglesShader draws triangles with the specified vertices and their indices with the specified shader.
|
||||
//
|
||||
@ -670,7 +670,7 @@ type DrawRectShaderOptions struct {
|
||||
}
|
||||
|
||||
// Check the number of images.
|
||||
var _ [len(DrawRectShaderOptions{}.Images)]int = [graphics.ShaderImageCount]int{}
|
||||
var _ [len(DrawRectShaderOptions{}.Images)]struct{} = [graphics.ShaderImageCount]struct{}{}
|
||||
|
||||
// DrawRectShader draws a rectangle with the specified width and height with the specified shader.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user