move cmp to where it's used
This commit is contained in:
parent
680bb244d2
commit
678c7c843a
2 changed files with 4 additions and 4 deletions
|
|
@ -34,10 +34,6 @@ type Iterator struct {
|
||||||
err error
|
err error
|
||||||
}
|
}
|
||||||
|
|
||||||
func cmp(a, b int64) int {
|
|
||||||
return int(a - b)
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewIterator(tree *b.Tree, data string, qs *QuadStore) *Iterator {
|
func NewIterator(tree *b.Tree, data string, qs *QuadStore) *Iterator {
|
||||||
iter, err := tree.SeekFirst()
|
iter, err := tree.SeekFirst()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,10 @@ func init() {
|
||||||
}, nil, nil)
|
}, nil, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func cmp(a, b int64) int {
|
||||||
|
return int(a - b)
|
||||||
|
}
|
||||||
|
|
||||||
type QuadDirectionIndex struct {
|
type QuadDirectionIndex struct {
|
||||||
index [4]map[int64]*b.Tree
|
index [4]map[int64]*b.Tree
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue