internal/packing: rename a function

This commit is contained in:
Hajime Hoshi 2024-01-13 17:42:51 +09:00
parent 3651d73e0b
commit d906dc3a21

View File

@ -172,7 +172,7 @@ func (p *Page) Alloc(width, height int) *Node {
region: image.Rect(0, 0, p.width, p.height), region: image.Rect(0, 0, p.width, p.height),
} }
} }
return p.extendForAndAlloc(width, height) return p.extendAndAlloc(width, height)
} }
func (p *Page) Free(node *Node) { func (p *Page) Free(node *Node) {
@ -210,7 +210,7 @@ func walk(n *Node, f func(n *Node) error) error {
return nil return nil
} }
func (p *Page) extendForAndAlloc(width, height int) *Node { func (p *Page) extendAndAlloc(width, height int) *Node {
if n := alloc(p.root, width, height); n != nil { if n := alloc(p.root, width, height); n != nil {
return n return n
} }