mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/packing: refactoring: remove a redundant check of sizes
This commit is contained in:
parent
574925cf7a
commit
ce71c31a27
@ -20,10 +20,6 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
const (
|
||||
minSize = 1
|
||||
)
|
||||
|
||||
type Page struct {
|
||||
root *Node
|
||||
width int
|
||||
@ -191,12 +187,6 @@ func (p *Page) Alloc(width, height int) *Node {
|
||||
height: p.height,
|
||||
}
|
||||
}
|
||||
if width < minSize {
|
||||
width = minSize
|
||||
}
|
||||
if height < minSize {
|
||||
height = minSize
|
||||
}
|
||||
return p.extendForAndAlloc(width, height)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user