internal/packing: refactoring: remove a redundant check of sizes

This commit is contained in:
Hajime Hoshi 2023-04-09 01:13:40 +09:00
parent 574925cf7a
commit ce71c31a27

View File

@ -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)
}