Skip to content

Commit

Permalink
optimize for
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Aug 7, 2023
1 parent 39f33c9 commit 8e8a9ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packer.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ func (p *Packer) packToBox(b *Box, items []*Item) []*Item {

for k := 0; k < total && itemsFit < total; k++ {
// Trying anchor points for the box that don't intersect with existing items in the box.
itemFit:
for j := len(b.items) - 1; j >= 0; j-- {
dimension := b.items[j].GetDimension()

Expand All @@ -138,7 +137,7 @@ func (p *Packer) packToBox(b *Box, items []*Item) []*Item {
if b.PutItem(copyItems[k], pv) {
itemsFit++

break itemFit
break
}
}
}
Expand Down

0 comments on commit 8e8a9ca

Please sign in to comment.