mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
minSize = 1
|
|
||||||
)
|
|
||||||
|
|
||||||
type Page struct {
|
type Page struct {
|
||||||
root *Node
|
root *Node
|
||||||
width int
|
width int
|
||||||
@ -191,12 +187,6 @@ func (p *Page) Alloc(width, height int) *Node {
|
|||||||
height: p.height,
|
height: p.height,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if width < minSize {
|
|
||||||
width = minSize
|
|
||||||
}
|
|
||||||
if height < minSize {
|
|
||||||
height = minSize
|
|
||||||
}
|
|
||||||
return p.extendForAndAlloc(width, height)
|
return p.extendForAndAlloc(width, height)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user