Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Aug 7, 2023
1 parent f94939f commit 7b0d233
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ linters-settings:
allow:
- $gostd
- github.com
issues:
exclude-rules:
- path: (.+)_test.go
linters:
- dupl
1 change: 0 additions & 1 deletion box.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func (b *Box) PutItem(item *Item, p Pivot) bool {

break
}

}

return fit
Expand Down
1 change: 1 addition & 0 deletions copyptr.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ func copyPtr[T any](original *T) *T {

func copySlicePtr[T any](data []*T) []*T {
result := make([]*T, len(data))

for i := range data {
val := *data[i]
result[i] = &val
Expand Down
1 change: 1 addition & 0 deletions packer.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func (p *Packer) packToBox(b *Box, items []*Item) []*Item {
// Trying anchor points for the box that don't intersect with existing items in the box.
for j := range b.items {
dimension := b.items[j].GetDimension()

for pt := WidthAxis; pt <= DepthAxis && !fitted; pt++ {
pv[WidthAxis] = b.items[j].position[WidthAxis]
pv[HeightAxis] = b.items[j].position[HeightAxis]
Expand Down

0 comments on commit 7b0d233

Please sign in to comment.