Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions space2trees/spacebtree.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package space2trees

import (
"github.com/arran4/spacemap/shared"
"strconv"

"github.com/arran4/spacemap/shared"
)

type Type int
Expand Down Expand Up @@ -174,7 +175,7 @@ func (n *Node) AvlBalance(depth int) *Node {
}
_ = n.RecalculateDepth(depth)
nBal := n.Balance()
var cBal Balance = Balanced
var cBal = Balanced
switch nBal {
case Left:
cBal = n.Children[0].Balance()
Expand Down
7 changes: 4 additions & 3 deletions space2trees/spacebtree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package space2trees
import (
"bytes"
"fmt"
"github.com/arran4/spacemap/shared"
"github.com/google/go-cmp/cmp"
"image"
"reflect"
"testing"

"github.com/arran4/spacemap/shared"
"github.com/google/go-cmp/cmp"
)

func NSMBalanced(shapes ...shared.Shape) func() *Struct {
Expand Down Expand Up @@ -1017,7 +1018,7 @@ func TestNode_InsertHere(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.InsertHere(tt.ZIndex, tt.Shape, tt.Type)
if diff := cmp.Diff(tt.Node.Here, tt.Expected); diff != "" {
if diff := cmp.Diff(tt.Here, tt.Expected); diff != "" {
t.Errorf("Error mismatch with here and expected;\n%s", diff)
}
})
Expand Down
5 changes: 3 additions & 2 deletions spacepartition/spacemap.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package spacepartition

import (
"github.com/arran4/spacemap/shared"
"image"
"sort"

"github.com/arran4/spacemap/shared"
)

type Alignment int
Expand Down Expand Up @@ -177,7 +178,7 @@ func (m *Struct) Add(shape shared.Shape, zIndex int) {
}
maxyi++
} else {
m.VSplits[minxi].BecauseOf = append(m.VSplits[minxi].BecauseOf, shape)
m.VSplits[minyi].BecauseOf = append(m.VSplits[minyi].BecauseOf, shape)
}
if minxhs[0] != nil {
for _, vs := range m.VSplits {
Expand Down
Loading